Shutter Preloader
Open a two-panel intro after the fonts and first-screen images are ready.
- Dependencies
- gsap
- Size
- 375 lines
- Controls
- 10 controls
Installation
CLI · shadcn registry
npx shadcn@latest add https://ui.onycx.dev/r/shutter-preloader.json1 · Dependencies
npm install gsap2 · Copy the source
components/onycx/shutter-preloader.tsx
Requires React 19 and Tailwind CSS v4. Copy the source from the shutter-preloader.tsx tab after tweaking: your values are baked in as the new defaults. Exported image examples use portable sample artwork. Replace it with your own media as needed.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| word | string | "ATLAS" | Display word; each letter rises out of its own mask. Words longer than five letters scale down to fit. |
| brand / showMark / caption | string / boolean / string | — | Top row: chevron mark and wordmark, and a caps caption hidden under 700px. |
| kicker / signature / signatureAccent | string | — | Line above the word and the line under it; the accent takes the highlight colour. |
| startDelay / minDuration / maxDuration | number | 350 / 850 / 4200 | Hydration wait, never-flash minimum and hard cap (ms). A CSS failsafe hides the panel after 7s regardless. |
| accent / background / tint / highlight | string | "#ff5825" / "#141414" / "#004a6b66" / "#bfd8e3" | Progress and mark, shutter, seam glow, kicker and ticks. |
| oncePerSession / sessionKey | boolean / string | false / "onycx-shutter" | Optionally skip straight in for returning visitors in the same session. |
| inertSelector | string | "main" | Regions made inert while the shutter is closed (the source used .skip-link, .header, #main, .footer). |
| imageSelector | string | — | Images that count as the first perspective. Defaults to every image intersecting the first viewport. |
| onComplete | (skipped: boolean) => void | — | Fires once the shutter is gone; start hero entrances here. |