Kinetik UI

Story Card

.md

Full-bleed stories with progress bars: tap to step, hold to pause, each picture drifting closer as it plays.

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

Installation

Kinetik CLI
npx kinetik-ui add story-card

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/story-card.json

Install manually

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

Usage

import { StoryCard } from '@/components/kinetik/story-card';

<StoryCard
  stories={[
    { key: 'dunes', image: require('./dunes.jpg'), title: 'Huacachina', caption: 'Day 1' },
    { key: 'sands', image: require('./sands.jpg'), title: 'White Sands', caption: 'Day 2' },
  ]}
  header={<SourceRow />}
/>;

The card takes the width it is given and sets its height from aspect (1.5 by default). header is laid over the top under the bars, for a source and a time.

When to use

  • Short visual sequences people tap through: trip highlights, product launches, a recap.
  • Onboarding told in pictures, where people set the pace.

When not to use

  • Content people need to read closely or come back to. Use a list or a carousel they control.
  • Long videos. This shows pictures; pair it with a video player for footage.

Notes

  • Tap the left third to go back, anywhere else to go forward; hold to pause. Pass paused while the card is off screen.
  • While a screen reader runs, stories do not move on by themselves; people step with the adjust gesture.
  • Every picture is mounted once and crossfaded, so keep the set short (up to about ten) and the images small.
  • With reduced motion pictures switch without the fade or the drift.

Props

StoryCardProps

PropTypeDefaultDescription
storiesrequiredreadonly Story[]—
durationnumber5000How long each story shows, in ms. Defaults to 5000.
initialIndexnumber0Story to start on. Defaults to 0.
onIndexChange(index: number) => void—
onEnd() => void—Called after the last story when `loop` is off.
loopbooleantrueStart again after the last story. Defaults to true.
pausedbooleanfalseHold every story still, e.g. while the card is off screen.
aspectnumber1.5Height divided by width. Defaults to 1.5.
headerReactNode—Laid over the top of the card, under the progress bars: a source, a time.
hapticsbooleantrueA tick when stepping by hand. Defaults to true.
testIDstring—
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
One timing value drives the bar and the drift on the UI thread; every picture is mounted once and crossfaded, so stepping never waits on a decode.
Measured

Pixel 9 emulator, API 35, release build · interaction median 0.95× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 160 MB app memory. Animates by design while a story plays; pass paused off-screen.

Real-device measurement pending.

Accessibility

Reduced motion
Pictures switch without the fade or the drift; the bars still fill.
Screen readers
An adjustable element named after the story, valued 'Story 2 of 5'; swipe up or down to step. Stories do not advance on their own while a screen reader runs.
Touch target
The whole card: its left third steps back, the rest forward.

Source files

components/kinetik/story-card.tsx is in the Code tab of the preview above.