Loader
Split Loader
NewTwo halves cover the page and slide apart to the sides.
npx motionsnack add split-loaderCustomize
<SplitLoader />Props
9 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 | 1400 | How long the two halves take to slide apart, 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 Split Loader
A full-screen intro: two panels meet in the middle of the screen and, after a short hold, slide apart to the left and right like doors, uncovering the page from its centre. 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
- Two halves that open like doors
- Slide duration as a prop
- 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 split-loader