Preloader Pro
A cinematic two-stage loader: heavy percentage with a thin red line on white, then a sliding panel reveal into a dark DAVINCIUI hero.
Installation#
pnpm dlx shadcn@latest add @davinciui/preloader-proUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
modeSizing context. One engine and timeline either way; only responsive dimension caps change. | "preview" | "fullscreen" | "preview" |
durationMilliseconds for the 0 → 100 progression. | number | 2200 |
completionHoldMilliseconds the completed 100% frame holds. | number | 180 |
exitDurationMilliseconds for the white-panel exit reveal. | number | 900 |
progressColorThin progress line color. | string | "#D3001B" |
loaderBackgroundLoader panel background. Pure white. | string | "#FFFFFF" |
textHero word, rendered once, centered. Rendered exactly as provided. | string | "DAVINCIUI" |
textColorCenter hero ink. Defaults follow the website color scheme. | string | theme-aware ("#F4ECEC" / "#191114") |
backgroundColorHero base background. Defaults follow the website color scheme. | string | theme-aware ("#070707" / "#F4F1EE") |
glowColorAtmospheric illumination at the hero center. | string | theme-aware (deep red / soft rose) |
themeColor scheme for the hero defaults. Auto follows the website and updates live; explicit colors always win. The white loading stage is fixed reference artwork. | "auto" | "light" | "dark" | "auto" |
showProgressShow the percentage counter and line. | boolean | true |
autoStartStart playing on mount. When false, the hero rests revealed. | boolean | true |
loopLoop forever: hero fades → black → panel returns → replay. | boolean | false |
loopHoldMilliseconds the revealed hero holds before a loop restart. | number | 2600 |
fontFamilyCounter / hero font stack. Heavy geometric sans recommended. | string | — |
onPhaseChangeFires on every transition: loading, holding, exiting, revealed, looping. | (phase) => void | — |
onCompleteFires once the reveal finishes (every loop when looping). | () => void | — |
classNameAdditional classes for the container. | string | — |
Accessibility#
role progressbar with aria-label Page loading reports aria-valuenow only in 25 percent milestones, while the visual counter and hero are aria-hidden. The loader does not move focus or expose a skip control.
Motion#
A piecewise curve drives the counter and scaleX line, then the panel slides away and the hero settles with ambient drift. duration, completionHold, exitDuration, and loopHold set timing; matchMedia reduced motion shortens phases and swaps the slide for a fade.
About Preloader Pro#
A two-stage cinematic preloader: a pure-white panel with a heavy centered percentage and a thin red progress line, then a sliding panel reveal into a dark atmospheric hero with a single massive centered word.
The percentage follows a loading curve — quick open, steady middle, deliberate landing — and the red line grows in lockstep via scaleX with a left origin, so it never triggers layout. At 100% the frame holds briefly, then the whole white surface slides away upward, exposing the hero already mounted underneath.
One requestAnimationFrame timeline derives every visual from elapsed time. The container is the viewport — relative positioning plus container-query units only, never position: fixed — so the identical component fills a card, the preview panel, and fullscreen.
Behavior#
- Phases move through
loading → holding → exiting → revealed, then rest on the hero. - Modes —
preview | fullscreenshare one engine and timeline; only responsive dimension caps change. - Hero — one centered DAVINCIUI wordmark on near-black with deep-red central illumination and a barely-there ambient drift.
- Loop — set
loopfor a self-running cycle: hero fades, black holds, the panel returns and the counter runs again. Or replay by remounting with a changingkey. - Reduced motion keeps the functional percentage but shortens the count and swaps the slide for a simple fade.
Best For#
Product launches, campaign pages, and portfolio intros where the first paint should feel like a confident editorial curtain-lift into a dark cinematic hero.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

