Skip to content
Onycx-ui
ESC

Pinned Card Deck

Keep a heading in view while photo cards rise into place beside it and the previous card tips back.

Dependencies
gsap
Size
295 lines
Controls
9 controls

Installation

CLI · shadcn registry

npx shadcn@latest add https://ui.onycx.dev/r/pinned-card-deck.json

1 · Dependencies

npm install gsap

2 · Copy the source

components/onycx/pinned-card-deck.tsx

Requires React 19 and Tailwind CSS v4. Copy the source from the pinned-card-deck.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

PropTypeDefaultDescription
itemsDeckChapter[]—{ label, title, body, note?, image, imageAlt? } per panel.
eyebrow / heading / headingAccentstring—Heading copy; the accent line is the italic serif in the accent colour.
introstring"Three small invitations.|One beautiful return to yourself."Paragraph under the heading; | breaks the line.
footStart / footEndstring"SCROLL AT YOUR OWN PACE" / "BODY / SKIN / SOUL"Captions either side of the chapter meter.
topOffsetnumber86Pin position below a fixed header (px); the stage is 100svh minus this.
distancenumber1.1Viewport heights per panel change; 3 panels pin for 2.2 × innerHeight.
scrubnumber0.8Seconds of smoothing between scroll and the deck.
radiusnumber22Photo corner radius inside the 4px panel.
background / ink / accentstring"#192f2a" / "#f4f0e6" / "#c9ad7a"Stage, text and bronze accent colours.