Put one card in each item, and give the stack room below the last card.
The sample also uses Card. One command adds them with this item:
how-it-works.tsx
StickyCardStack
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| offset | number | 80 | The px from the top of the view where the first card pins. Default 80 (under a header). |
| peek | number | 12 | The px of each card that stays in sight under the next one. Default 12. |
| shrink | number | 0.05 | How much smaller a card gets for each card on top of it: 0.05 is 5%. Default 0.05. |
| dim | number | 0.15 | How much a card dims for each card on top of it, from 0 to 1. Default 0.15. |
| disabled | boolean | false | The cards still pin, but never shrink or dim, and the rect work stops. |
| container | RefObject<HTMLElement | null> | — | The scroll box, when the stack scrolls inside one and not with the page. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
StickyCardStackItem
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
| Tab | A focus in a covered card scrolls back to where that card pins, so the focused control shows. |
|---|
Built with
Installs with Sticky Card Stack
- Components
- Parallax











