Kinetik UI

Scroll Stack

.md

A scroll view whose cards pin to the top and pile up, the ones beneath shrinking and dimming as more land.

v1.0.0Live on webreact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add scroll-stack

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/scroll-stack.json

Install manually

  1. Install dependencies
    npx expo install react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/scroll-stack.tsx
    View source files

Usage

import { ScrollStack } from '@/components/kinetik/scroll-stack';

<ScrollStack cardHeight={320} header={<Intro />} contentContainerStyle={{ padding: 16 }}>
  {chapters.map((c) => (
    <Chapter key={c.id} chapter={c} />
  ))}
</ScrollStack>;

Give it a height (it fills its parent with flex: 1). Each child becomes a full-width card; header scrolls away above them.

When to use

  • A short sequence read one after another: chapters, steps, features, plans.
  • Landing and onboarding screens where the pile itself shows progress.

When not to use

  • Long feeds. Cards stay mounted, and a deep pile stops reading as a stack.
  • Cards of different heights; every card is cardHeight tall.

Notes

  • peek is how much of each stacked card stays visible above the next, so the pile shows how far you have come.
  • Covered cards shrink by depth per card on top of them and dim slightly.
  • The scroll indicator is hidden; the stack is its own progress.

Props

ScrollStackProps

PropTypeDefaultDescription
childrenrequiredReactNode—The cards. Each child becomes one card of `cardHeight`.
headerReactNode—Scrolls away above the stack.
cardHeightnumber300Height of every card. Defaults to 300.
gapnumber24Space between cards before they stack. Defaults to 24.
peeknumber12How much of each stacked card stays visible above the next. Defaults to 12.
topInsetnumber16Where the stack pins, from the top of the scroll view. Defaults to 16.
depthnumber0.06How much a covered card shrinks per card on top of it, 0–0.15. Defaults to 0.06.
radiusnumber—Corner radius of the cards. Defaults to the theme `xl` radius.
styleStyleProp<ViewStyle>—
contentContainerStyleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
One scroll offset drives a transform and an overlay per card on the UI thread; nothing renders while scrolling.
Measured

Pixel 9 emulator, API 35, release build · interaction median 0.85× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 149 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
Cards still pin and stack, which is how the layout reads, but without shrinking or dimming.
Screen readers
A plain scroll view; cards are read in order and their content keeps its own roles.
Touch target
Cards are full width and `cardHeight` tall.

Source files

components/kinetik/scroll-stack.tsx is in the Code tab of the preview above.