Kinetik UI

Side Drawer

.md

A navigation drawer that springs in from the side as its rows follow one by one; drag it back to close.

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

Installation

Kinetik CLI
npx kinetik-ui add side-drawer

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/side-drawer.json

Install manually

  1. Install dependencies
    npx expo install react-native-gesture-handler react-native-reanimated react-native-safe-area-context react-native-worklets
  2. Copy the source files
    • components/kinetik/side-drawer.tsx
    View source files

Usage

import { SideDrawer } from '@/components/kinetik/side-drawer';

<SideDrawer
  visible={open}
  onClose={() => setOpen(false)}
  items={[
    { key: 'inbox', label: 'Inbox', badge: '12' },
    { key: 'sent', label: 'Sent' },
  ]}
  active={section}
  onSelect={(key) => {
    setSection(key);
    setOpen(false);
  }}
  header={<Account />}
/>;

When to use

  • Apps with more sections than fit in a tab bar: mail folders, workspaces, admin areas.
  • Secondary navigation that people open now and then, not on every screen.

When not to use

  • Three to five main sections used all the time. Use a tab bar (Dock Bar or Liquid Tabs).
  • A list of actions on one object. Use Action Sheet.

Notes

  • items render as rows that slide in one by one; header and footer take any content.
  • Drag the panel towards its edge past about a third of its width, or flick it, to close; the other way it resists.
  • Top and bottom padding follow the safe area when the app has a SafeAreaProvider (Expo Router adds one).
  • With reduced motion it appears and disappears without sliding.

Props

SideDrawerProps

PropTypeDefaultDescription
visiblerequiredboolean—
onCloserequired() => void—Called for a tap outside, a drag back to the edge, Back and the escape gesture.
itemsreadonly DrawerItem[][]Navigation rows. They slide in one after another as the drawer opens.
activestring—The key of the current row, which gets a highlight.
onSelect(key: string) => void—
headerReactNode—Content above the rows, e.g. the account.
footerReactNode—Content pinned to the bottom, e.g. settings and sign out.
side'left' | 'right''left'Which edge it comes from. Defaults to "left".
widthnumber—Defaults to 85% of the screen, at most 320.
hapticsbooleantrueA tick when a row is chosen. Defaults to true.
testIDstring—
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
A transparent modal of plain views; the panel, scrim and rows read two shared values. Nothing runs at rest.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.11× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 147 MB app memory. p99 spikes are the first frame of the modal window opening.

Real-device measurement pending.

Accessibility

Reduced motion
The drawer appears and disappears without sliding, rows included.
Screen readers
Rows are menu items with a selected state; outside the panel is a "Close menu" button, and Back closes it.
Touch target
Rows are 48 pt tall and nearly the full width of the panel.

Source files

components/kinetik/side-drawer.tsx is in the Code tab of the preview above.