Kinetik UI

Drift Marquee

.md

An endless row that drifts on its own; drag it to scrub, fling it, and the items lean into the speed.

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

Installation

Kinetik CLI
npx kinetik-ui add drift-marquee

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/drift-marquee.json

Install manually

  1. Install dependencies
    npx expo install react-native-gesture-handler react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/drift-marquee.tsx
    View source files

Usage

import { DriftMarquee } from '@/components/kinetik/drift-marquee';

<DriftMarquee itemWidth={160} height={200}>
  {covers.map((c) => (
    <Image key={c.id} source={{ uri: c.url }} style={{ flex: 1, borderRadius: 16 }} />
  ))}
</DriftMarquee>;

Every child becomes an item itemWidth wide that fills the row's height. The row repeats itself to fill the width, so even a few items loop without a gap.

When to use

  • Showcases and landing screens: covers, logos, artworks, testimonials.
  • A lively background row that people can also play with.

When not to use

  • Content people need to read or tap precisely. It keeps moving.
  • Inside horizontal scroll views; both want the sideways drag.

Notes

  • speed is in points per second; set it to 0 for a row that only moves when dragged.
  • A fling eases back to the drift; lean sets how far items tilt at speed.
  • Pass active={false} while the row is off-screen to stop its frame callback.

Props

DriftMarqueeProps

PropTypeDefaultDescription
childrenrequiredReactNode—The items. Each child is laid out `itemWidth` wide.
itemWidthrequirednumber—
heightnumber180Height of the row, including 8 pt above and below the items for their lean. Defaults to 180.
gapnumber12Space between items. Defaults to 12.
speednumber32Drift speed in pt per second. 0 holds still until dragged. Defaults to 32.
direction'left' | 'right''left'Which way the row drifts. Defaults to `left`.
draggablebooleantrueLet the row be dragged and flung. Defaults to true.
leannumber0.6How far items lean into fast movement, 0–1. Defaults to 0.6.
activebooleantruePause drifting, e.g. while off-screen. Defaults to true.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
A frame callback advances one offset on the UI thread; each item wraps around with a single transform. Pass active={false} off-screen to stop it.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.10× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 188 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
No drift and no lean. The row still scrolls by dragging.
Screen readers
Each item is read once; the copies that fill the loop are hidden.
Touch target
The whole row is the drag area.

Source files

components/kinetik/drift-marquee.tsx is in the Code tab of the preview above.