Overlap Sections
Stack page sections so the next rounded panel slides over the one you just read.
- Dependencies
- gsap
- Size
- 391 lines
- Controls
- 5 controls
Installation
CLI · shadcn registry
npx shadcn@latest add https://ui.onycx.dev/r/overlap-sections.json1 · Dependencies
npm install gsap2 · Copy the source
components/onycx/overlap-sections.tsx
Requires React 19 and Tailwind CSS v4. Copy the source from the overlap-sections.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 |
|---|---|---|---|
| sections | OverlapSection[] | — | { variant: 'atelier' | 'nocturne' | 'silk' | 'invitation', eyebrow?, heading, body?, image?, imageAlt?, caption?, ctaLabel?, href? }; | breaks heading lines. |
| radius | number | 32 | Settled radius; phones use min(25, radius). |
| overlap | number | 42 | Negative top margin of every chapter after the first (px); the inset nocturne adds 14px, phones use 34px. |
| scrub | number | 0.65 | Scrub smoothing of the rise. |
| hold | boolean | true | Make the previous chapter sticky (when shorter than 1.5 viewports) so the next sheet covers it. |
| accent | string | "#ffc7c3" | Blush: dark-surface pills, focus rings and the silk copy card. |