ZeroGravity UI

Motionstable

ScrollStack

Full-height sections that slide over each other on scroll, and unstack back.

01 / 05

One

02 / 05

Two

03 / 05

Three

04 / 05

Four

05 / 05

Five

scrolls inside this frame

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
44cqhheight
sizeMix
30 pxtop
16 pxpeek
20 pxrounded
5cards
Motionhow a covered card recedes
0.900scaleTo
0.450dim
dimColor
1.000opacityTo
0 pxliftTo
0.00 pxblurTo
easing
disabled

Usage

TSX
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

15 documented props on ScrollStack
PropertyTypeDefaultDescription
heightstring"44cqh"Card height. Range 20 to 90 cqh.
topnumber30Sticky offset. Range 0 to 200 px.
peeknumber16Peek per card. Range 0 to 80 px.
roundednumber20Corner radius. Range 0 to 48 px.
scaleTonumber0.9Scale down to. Range 0.6 to 1.
dimnumber0.45Dim overlay. Range 0 to 1.
dimColorstring"#05050a"Dim colour.
opacityTonumber1Fade to (see-through). Range 0 to 1.
liftTonumber0Lift up by. Range 0 to 160 px.
blurTonumber0Blur. Range 0 to 20 px.
easing"smooth" | "linear""smooth"Easing.
disabledbooleanfalseDisable motion (plain sticky).
childrenReactNode—One element per card. Each becomes a sticky section.
heightsstring[]—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.