Editorial Wipe Preloader
A fullscreen forest-to-cream horizontal wipe with a giant split-tone counter and a vertical slide-away reveal.
Installation#
pnpm dlx shadcn@latest add @davinciui/editorial-wipe-preloaderUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
durationMilliseconds for the simulated 0 → 100 progression (auto mode). | number | 3800 |
completionHoldMilliseconds the completed 100 frame stays visible. | number | 450 |
exitDurationMilliseconds for the vertical exit reveal. | number | 900 |
darkColorFullscreen base field — deep forest green. | string | "#1A241E" |
lightColorDominant light surface — warm cream. | string | "#E4E0D7" |
accentColorMid-tone travelling band — muted beige. | string | "#C7B39E" |
counterDarkColor / counterLightColorGiant counter ink over the dark field and over the cream field. | string / string | "#8A8A8A" / "#AAA0A1" |
showLoadingLabel / loadingLabelTiny uppercase label above the counter. | boolean / string | true / "LOADING" |
startValue / endValueCounter values at progress 0 and 100. | number / number | 0 / 100 |
modeViewport covers the screen (fixed); container fills a relative, overflow-hidden parent (absolute). Identical animation logic. | "viewport" | "container" | "viewport" |
counterFontSize / counterFontWeight / counterFontFamilyCounter typography, relative to the loader's own width. Keep the weight light. | string / number / string | clamp(2.5rem, 24cqw, 26.25rem) / 300 / inherit |
progressManual 0–100 override. Disables simulation; 100 triggers exit. | number | — |
debugProgressDev-only 0–1 freeze frame. Disables autoplay for calibration. | number | — |
autoPlay / disableScroll / respectReducedMotionPlayback, scroll-lock, and reduced-motion behavior. | boolean | true |
zIndexStacking order of the overlay. | number | 9999 |
onStart / onProgressFires on start and on every integer change. | () => void / (value) => void | — |
onPhaseChangeFires on every transition: idle, loading, complete, 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 is role='status' with an aria-label like 'Page loading, LOADING'; all visual counters and the wipe are aria-hidden. A polite live region announces only 0, 25, 50, 75, and 100 percent milestones. Page scroll is locked while the overlay is mounted.
Motion#
A framer-motion progress value drives the wipe, counter, and mask; duration, completionHold, and exitDuration control a 3.8s simulated load and cubic-bezier(0.76,0,0.24,1) vertical exit. useReducedMotion caps loading at 450ms and exit at 250ms when respectReducedMotion is true.
About Editorial Wipe Preloader#
A fullscreen editorial loading wipe: one continuous cream reveal with a beige leading edge sweeps horizontally over a deep forest field while an oversized tabular counter rides along the lower-left.
The counter renders twice — dark ink and muted taupe — and the taupe render is clipped to the cream region, so a single glyph can span the moving color boundary. At 100 the cream frame holds briefly, then the entire overlay lifts vertically upward as one surface, revealing the page already mounted beneath it. Your content exists underneath; the preloader is purely an overlay covering it.
One motion value drives the counter, the reveal position, the counter mask and the label, so they can never drift apart. The reveal moves with a single GPU-friendly translate3d transform and the counter updates imperatively — React never rerenders at 60fps.
Behavior#
- Phases move through
idle → loading → complete → exiting → finished, then the overlay unmounts itself. - Auto mode simulates a staged cinematic progression — quick open, steady middle, deliberate crawl into 100.
- Manual mode follows the
progressprop with smoothing, so hook it to real loading when available. - Debug — pass
debugProgress(0–1) to freeze the exact visual state for screenshot comparison. - Replay by remounting with a changing
key. - Scroll is locked while the overlay is alive and restored on exit.
- Reduced motion shortens the simulation and exit while keeping the same sequence.
Best For#
Portfolio intros, editorial sites, and campaign pages where loading itself should feel like a designed title card rather than a spinner.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

