Staircase Preloader
A fullscreen orange stepped-curtain loader that exits upward with a left-to-right staircase edge and a top-right finish.
Installation#
pnpm dlx shadcn@latest add @davinciui/staircase-preloaderUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
colorSolid color of the fullscreen curtain. | string | "#FF3D00" |
stepCountNumber of vertical strips forming the staircase (4–12). | number | 8 |
holdDurationMilliseconds the fully-covered orange frame stays visible. | number | 200 |
exitDurationMilliseconds for each column's upward travel. | number | 850 |
staggerDelay in milliseconds between successive columns, left to right. | number | 55 |
zIndexStacking order of the overlay. | number | 9999 |
onPhaseChangeFires on every transition: idle, holding, exiting, finished. | (phase) => void | — |
onCompleteFires once the exit reveal finishes and the overlay unmounts. | () => void | — |
classNameAdditional classes for the overlay wrapper. | string | — |
Accessibility#
The overlay exposes role status with aria-label Page loading, and strips are aria-hidden. Scroll is locked, but focus is not trapped or moved, so keyboard users can tab to content behind the curtain until it exits.
Motion#
Columns lift upward with a cubic-bezier(0.76,0,0.24,1) ease, controlled by holdDuration, exitDuration, and stagger. useReducedMotion caps the hold, removes stagger, and shortens exit to 250ms while still moving the strips.
About Staircase Preloader#
A fullscreen stepped-curtain reveal: a solid vivid orange overlay holds briefly, then leaves upward as vertical strips with a small left-to-right stagger — so the lower edge reads as a rectangular staircase that exits near the top-right.
The strips overlap by a pixel to render as one continuous orange surface with zero seams. Your page content already exists underneath and stays completely stationary; the preloader purely uncovers it with GPU-friendly transform motion and a strong ease-out curve.
Behavior#
- Phases move through
idle → holding → exiting → finished, then the overlay unmounts itself. - Staircase comes from per-column delays — the left strip lifts first and each strip to the right follows ~55ms later.
- Replay by remounting with a changing
key. - Scroll is locked while the overlay is alive and restored on exit.
- Theme — the curtain is an opaque brand color, so it is identical in light and dark mode by design; the revealed page underneath adapts as usual.
- Reduced motion keeps the same sequence with a short, stagger-free reveal.
Best For#
Portfolio intros, campaign pages, and product launches where the first paint should feel like a confident geometric curtain being pulled upward.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

