Geometric Preloader
A fullscreen geometric loader with nested rotating squares and a diamond-scale reveal.
Installation#
pnpm dlx shadcn@latest add @davinciui/geometric-preloaderUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
durationMilliseconds spent in the loading phase. | number | 2200 |
holdDurationMilliseconds the completed geometric frame holds. | number | 180 |
exitDurationMilliseconds for the diamond-scale reveal. | number | 720 |
backgroundColorOverlay background color. Defaults follow the page color scheme. | string | theme-aware ("#111111" / "#e8e6e3") |
foregroundColorSecondary square-line color. Defaults follow the page color scheme. | string | theme-aware ("#f5f1e8" / "#1b1b19") |
accentColorAccent line and progress color. | string | "#ff4d23" |
themeColor scheme for the defaults. Auto follows the page and updates live; explicit colors always win. | "auto" | "light" | "dark" | "auto" |
showLabelShow the progress label in the center. | boolean | true |
onCompleteFires once after the reveal finishes. | () => void | — |
Accessibility#
The overlay is a role=progressbar labelled Page loading, with aria-valuenow updated in 25 percent milestones; decorative squares and the counter are aria-hidden. Page scroll is locked during the sequence, and there is no keyboard dismissal or skip action.
Motion#
Nine nested squares counter-rotate continuously while a staged progress value ignites them, then the overlay exits through an eased diamond clip-path. duration, holdDuration and exitDuration control timing. prefers-reduced-motion shortens each phase, replaces the clip-path reveal with a fade, and disables square rotation through CSS.
About Geometric Preloader#
Nested square outlines create a precise geometric signal while the loading phase runs. The completed frame expands as a diamond to expose the page beneath it. Remount the component to replay the sequence.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

