ahn heejong

Facebook Shimmer

Facebook's famous shimmering effect for placeholders. The trick here is, you don't actually apply animations on several gray bars. Rather, you apply linear-gradient animation on the rectangular background and ‘mask’ the rest part using white rectangle (inspecting with DevTool might help you understand what's going on). So implementing this effect requires labor, not fancy library or anything.

Kudos to the smart person who first thought of this idea 👏

view source code for this component