Loader
Curtain Loader
NewFour columns of panels cover the page, then slide away up and down, one column after another.
npx motionsnack add curtain-loaderCustomize
<CurtainLoader />Props
10 properties
| Property | Type | Default | Description |
|---|---|---|---|
| background | string | zinc-100 / zinc-900 in dark | Colour of the loader's panels / backdrop. |
| color | string | zinc-950 / white in dark | Colour of text, numbers and lines drawn on it. This loader draws none; anything added through className inherits it. |
| contained | boolean | false | Fill the nearest positioned parent instead of the whole window. |
| loopDelayMs | number | 1200 | Pause before a looped loader starts again, in ms. |
| onPhase | (phase: 'in' | 'out' | 'done', revealAfterMs?: number) => void | - | Called on every phase change. With 'out' it also says after how many ms the page under the loader is visible enough to start its own animation. |
| className | string | '' | Extra classes on the loader. |
| slideMs | number | 1800 | How long one column takes to slide away, in ms. |
| columnStaggerMs | number | 260 | Delay between neighbouring columns, in ms. |
| minDurationMs | number | 700 | Minimum time on screen before it starts leaving, in ms. |
| loop | boolean | false | Start over a moment after it finishes. For demos; a real page shows it once. |
About Curtain Loader
A full-screen intro: the page starts covered by a 4 by 2 grid of panels. After a short hold each column opens in turn, its top panel sliding up and its bottom panel down, so the page appears in a staggered wipe. It covers the whole window by default or just its parent with the contained prop, reports its phases through onPhase so the page can start its own animation at the right moment, and is skipped for visitors who prefer reduced motion. Colours follow the light and dark look or come from props.
What's included
- 4 by 2 grid of panels
- Columns open one after another
- Slide duration and stagger as props
- Whole window or contained in a parent
- Phase callback for the page under it
- Light and dark, skipped with reduced motion
- Type
- Animated React loader component
- Library
- Components · Loader
- Stack
- Next.js, React, Tailwind CSS
- Added
- 2026-11-20
- Install
npx motionsnack add curtain-loader