Kinetik UI

Scroll Tabs

.md

Tabs over swipeable pages: the underline follows the swipe and stretches between tabs as labels brighten.

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

Installation

Kinetik CLI
npx kinetik-ui add scroll-tabs

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-tabs.json

Install manually

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

Usage

import { ScrollTabs } from '@/components/kinetik/scroll-tabs';

<ScrollTabs
  tabs={[
    { key: 'all', title: 'All', content: <AllFeed /> },
    { key: 'photos', title: 'Photos', content: <Photos /> },
    { key: 'videos', title: 'Videos', content: <Videos /> },
  ]}
  onIndexChange={setIndex}
/>;

When to use

  • Sibling views of the same kind that people swipe between: feed filters, categories, inbox folders.
  • More tabs than fit across the screen; the strip scrolls and keeps the current tab in view.

When not to use

  • The app's main sections. Use a bottom tab bar (Dock Bar or Liquid Tabs).
  • Two or three options that filter one list in place. Use Filter Chips or a segmented control.

Notes

  • The underline follows the swipe frame by frame on the UI thread and stretches slightly halfway between tabs.
  • Only the current page is exposed to screen readers; tabs are tab elements in a tablist.
  • Every page is rendered; keep heavy content lazy inside it if there are many tabs.
  • With reduced motion a tab tap jumps straight to its page.

Props

ScrollTabsProps

PropTypeDefaultDescription
tabsrequiredreadonly ScrollTab[]—
initialIndexnumber0The tab shown first. Defaults to 0.
onIndexChange(index: number) => void—
hapticsbooleantrueA tick when the tab changes. Defaults to true.
testIDstring—
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
Two native scroll views; the underline and labels read the page scroll offset on the UI thread. Nothing runs at rest.
Measured

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

Real-device measurement pending.

Accessibility

Reduced motion
Tapping a tab jumps to its page instead of scrolling.
Screen readers
A tab list whose tabs have a selected state; only the current page is exposed.
Touch target
Tabs are 48 pt tall and as wide as their label plus 32 pt.

Source files

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