
Lines Loader
Loaders
A stacked-panel loader that covers real route, asset, upload, or WebGL waits with a timed branded intro that fires onComplete when it finishes.
Stack Loader gives a real wait a visible state: panels stack during a real transition.
Use it for route latency, upload progress, asset warm-up, data loading, or WebGL initialization. Do not add a fake preloader to a fast page just to make it feel designed.
The thing to watch is dishonesty. Bind the loader to real state, use aria-busy where the region is updating, and never let a progress number claim completion before the content is ready.
import StackLoader from "@/components/effects/stack-loader"; export default function Page() { return <StackLoader />;}A fashion ecommerce brand can use Stack Loader as the entry to a new-season lookbook while its campaign imagery preloads. Images arrive as a stack, then spread apart as the season title animates in word by word.
The outcome is anticipation without delay. The loader plays a fixed-length intro over the preload, then hides itself and fires onComplete, so keep its duration in line with the real wait rather than holding a fast page back for show. Determinate progress must be tied to a real signal.
Not for fast pages, fake progress, manufactured waits, or loaders that hide usable content.
Tie animation to real load state, clean up timers, and avoid blocking first paint.
Use aria-busy on loading regions and concise status text. On mobile and reduced motion, prefer static progress text or skeletons.
| Prop | Type | Default | Description |
|---|---|---|---|
imageSize | number | 1 | Scale multiplier for the loader image stack. |
duration | number | 1 | Global duration multiplier for the loader animation. |
fadeOutDuration | number | 0.8 | Duration of the final image and loader fade-out. |
backgroundColor | string | #fcfcfc | Loader background color. |
Use it when a real route or asset wait needs a short branded cover of stacking panels.
Determinate loaders should always map to real progress. Fake progress damages trust.
Use aria-busy on the loading region and concise status text in a polite live region when useful.
Use skeletons when the layout is known and content streams into place.
With reduced motion, Stack Loader skips the slide, spread, and 3D text turns. The images appear already spread and fade in with a stagger, the text fades in and out, and the loader fades away on the same timed sequence before firing onComplete.
Need a custom effect? Tell us what to create.