Motion+

Loading overlay

An example of creating a line reveal loading animation with clipPath in Motion for React

Time
5 min
Difficulty
Intermediate
Access
Motion+
>Live exampleOpen in new tab

Introduction

The Line reveal example creates a dramatic loading animation where a thin vertical line extends from the center of the screen, then expands horizontally to reveal content beneath.

This example combines several Motion APIs: useSpring for smooth progress, useTransform to map progress to clip-path coordinates, useMotionTemplate to compose values into a CSS polygon, useMotionValueEvent to detect completion, and the animate function for the horizontal expansion.