Preloader Pro V1
A cinematic strip preloader with drifting portrait cards, a zero-padded counter, glitch bursts and a sliced-shred RGB exit.
Installation#
pnpm dlx shadcn@latest add @davinciui/preloader-pro-v1Usage#
API Reference#
| Prop | Type | Default |
|---|---|---|
imagesCard images rendered in order and looped seamlessly. Every image is preloaded and decoded. | { src: string; title?: string; caption?: string }[] | required |
labelTop-left monospace label. | string | "LOADING" |
modeTimed follows the measured curve; pageLoad follows real loading events. | "timed" | "pageLoad" | "timed" |
durationSeconds for the 0 → 100 progression. | number | 2.7 |
holdTimeSeconds the completed 100% frame holds. | number | 1.2 |
exitDurationSeconds for the sliced-shred exit. | number | 1.0 |
driftSpeedStrip drift speed in pixels per second. | number | 60 |
themePalette mode. Auto follows the site light/dark class; light uses warm paper and dark ink. | "auto" | "light" | "dark" | "auto" |
backgroundOverlay background override. Defaults to the active theme palette. | string | theme palette |
foregroundForeground ink override. Defaults to the active theme palette. | string | theme palette |
cardWidthCard width in px. | number | 200 |
cardHeightCard height in px. | number | 280 |
gapGap between cards in px. | number | 24 |
radiusCard corner radius in px. | number | 4 |
fontFamilyCounter and UI font stack. | string | "Inter Tight", … |
counterSizeCounter font size in px. | number | clamp(72px, 8.6vw, 160px) |
glitchTune enabled effects and intensity (0–1): chromatic, blocks, smear, lines. | object | all effects on |
exitTrailsRender grey trail blocks during the exit. | boolean | true |
lockScrollLock page scroll while the overlay is active. | boolean | true |
oncePerSessionPersist a sessionStorage flag and skip if the loader already ran. | boolean | false |
reducedMotionBehaviour when prefers-reduced-motion is set: skip entirely or fade out. | "skip" | "fade" | "fade" |
previewRender one frozen frame (counter 066, bar 66%) with no timers. | boolean | false |
seedDeterministic seed for glitch and exit randomness. | number | random |
onExitStartFires when the shred begins, so underlying content can animate in while the overlay breaks apart. | () => void | — |
onCompleteFires after the overlay is removed. | () => void | — |
Accessibility#
A role status with aria-live polite announces 0, 25, 50, 75, and 100 percent loaded, while the drifting cards, counter, and progress bar are aria-hidden. Scroll is locked while active, but the overlay is not modal, traps no focus, and offers no skip control; reduced-motion users get a short fade.
Motion#
A single requestAnimationFrame timeline derives the strip drift, power-curve counter, scaleX bar, seeded glitch bursts, and 28-band shred exit; duration, holdTime, exitDuration, driftSpeed, and seed control timing. matchMedia reduced motion removes drift, glitches, and the shred in favor of a short opacity fade.
About Preloader Pro V1#
A full-screen cinematic loader: a drifting strip of portrait cards on near-black (or warm paper in light mode), a zero-padded percentage counter, a hairline progress bar, and random glitch bursts that flicker over the scene.
The exit shreds the screen into horizontal bands. Outer bands slide sideways and drop away with grey trails, the central cards stretch into RGB-split ribbons and mosaic blocks, then the remaining bands collapse to a line at the vertical centre and vanish.
One requestAnimationFrame timeline derives every value from elapsed time. Only transforms, opacity and filter change, and the counter updates imperatively so React never re-renders at 60fps.
Behavior#
- Timed mode follows the measured power ease-out: 2.7s from 0 to 100, then a 1.2s hold before the 1s shred exit.
- Page load mode follows real loading events and image decoding, eased with the same curve and never going backwards.
- Glitches fire in short bursts — chromatic split, interference lines, displaced blocks, pixel smears and the occasional scrambled digit.
- Theme aware by default: it follows the site light/dark class, or set
themeto lock a palette. - Reduced motion removes drift, glitches and the shred, exiting with a short opacity fade.
- Replay with the exposed `replay()` ref handle.
Best For#
Editorial portfolios, fashion campaigns and launch pages where the first paint should feel like a glitched film leader shredding open.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

