Loader
Greeting Loader
NewGreetings in many languages flick past in the middle of the screen, then it fades out.
npx motionsnack add greeting-loaderCustomize
<GreetingLoader />Props
12 properties
| Property | Type | Default | Description |
|---|---|---|---|
| greetings | string[] | 16 greetings, ending on 'Hello' | Greetings in the order they scroll past. The last one is the word the loader stops on. |
| 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. |
| 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. |
| fillMs | number | 2600 | How long the run through all greetings takes, in ms. |
| holdMs | number | 520 | How long the last greeting stays before the fade, in ms. |
| fadeMs | number | 650 | How long the backdrop takes to fade away, in ms. |
| minDurationMs | number | 0 | Minimum time on screen before it starts leaving, in ms. The loader never leaves before the last greeting had its hold. |
| loop | boolean | false | Start over a moment after it finishes. For demos; a real page shows it once. |
About Greeting Loader
A full-screen intro that cycles through a list of greetings, one word at a time, while a line fills below. It holds on the last word for a moment and fades out. The words are a prop, so it can greet in your own languages. 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
- Greetings cycle one word at a time
- Your own list of words
- Fill, hold and fade duration 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 greeting-loader