Motionstable
ScrollStack
Full-height sections that slide over each other on scroll, and unstack back.
Scaled down to fit the frame: short cards and a small peek, so the whole deck is visible at once. On a page you would use full-height sections and no peek.
Customize
Layoutsize and sticky offsets
44cqh
heightsizeMix30 px
top16 px
peek20 px
rounded5
cardsMotionhow a covered card recedes
0.900
scaleTo0.450
dimdimColor1.000
opacityTo0 px
liftTo0.00 px
blurToeasingdisabledUsage
import { ScrollStack } from "zerogravity"
<ScrollStack>
<article>Card one</article>
</ScrollStack>Generated from the controls above. Only props that differ from their defaults are shown.
Props
| Property | Type | Default | Description |
|---|---|---|---|
height | string | "44cqh" | Card height. Range 20 to 90 cqh. |
top | number | 30 | Sticky offset. Range 0 to 200 px. |
peek | number | 16 | Peek per card. Range 0 to 80 px. |
rounded | number | 20 | Corner radius. Range 0 to 48 px. |
scaleTo | number | 0.9 | Scale down to. Range 0.6 to 1. |
dim | number | 0.45 | Dim overlay. Range 0 to 1. |
dimColor | string | "#05050a" | Dim colour. |
opacityTo | number | 1 | Fade to (see-through). Range 0 to 1. |
liftTo | number | 0 | Lift up by. Range 0 to 160 px. |
blurTo | number | 0 | Blur. Range 0 to 20 px. |
easing | "smooth" | "linear" | "smooth" | Easing. |
disabled | boolean | false | Disable motion (plain sticky). |
children | ReactNode | — | One element per card. Each becomes a sticky section. |
heights | string[] | — | Per-card height override, in place of the shared height. |
onActiveChange | (index: number) => void | — | Fires when the front-most card changes. |
Dependencies
0 external runtime dependencies
Ships with nothing but React.