Kinetik UI

Liquid Tabs

.md

A tab bar whose indicator flows like liquid, stretching, thinning and melting into place.

v1.0.0Live on web@shopify/react-native-skiareact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add liquid-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/liquid-tabs.json

Install manually

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

Usage

import { LiquidTabs } from '@/components/kinetik/liquid-tabs';

const [tab, setTab] = useState('for-you');

<LiquidTabs
  accessibilityLabel="Feed"
  tabs={[
    { key: 'for-you', label: 'For you' },
    { key: 'following', label: 'Following' },
    { key: 'nearby', label: 'Nearby' },
  ]}
  value={tab}
  onChange={setTab}
/>;

When to use

  • Two to five peer views of the same content: feeds, filters, time ranges.
  • Top-of-screen switches where a little fluidity adds character.

When not to use

  • More than five options or long labels; use a scrolling tab bar or a menu.
  • Primary app navigation between unrelated sections. Use a bottom bar (see Dock Bar).

Notes

  • The leading edge uses the snappy spring and the trailing edge the smooth one; that difference is the liquid stretch.
  • Labels change colour by how much of their tab the liquid covers, so the colour sweeps with the motion.
  • Pass color and activeTextColor together to keep the label readable on the indicator.
  • On the web the indicator stretches but skips the droplet and goo filter, which CanvasKit does not render.

Props

LiquidTabsProps

PropTypeDefaultDescription
tabsrequiredreadonly LiquidTab[]—
valuerequiredstring—Key of the selected tab.
onChangerequired(key: string) => void—
colorstring—Indicator colour. Defaults to the theme ember.
activeTextColorstring—Label colour on the indicator. Defaults to the theme onEmber.
hapticsbooleantrueA tick on change. Defaults to true.
accessibilityLabelstring—Accessible name of the tab list.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
While switching, three springs drive one small blurred layer (body and droplet); nothing runs at rest.
Measured

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

Real-device measurement pending.

Accessibility

Reduced motion
The indicator slides without stretching, droplet or goo filter.
Screen readers
Tab list with tabs that expose their selected state.
Touch target
Each tab spans its share of the bar and is 44 pt tall.

Source files

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