SwipeUI

Bottom Sheet

Present compact tasks, an inset iOS sheet, a blurred backdrop, or a scrollable panel with snap points.

npx @swipeui/cli add sheet
Variant
Preset
Material
Scheme
Feel
Real free component with a browser animation bridge. Native motion, haptics and materials need a device.

When to use it

  • Give a short task or list room at the bottom of the current screen.
  • Use an inset system presentation for a compact task on iOS.
  • Use snap points and a scrollable body for longer content.

When not to use it

  • Use Dialog for a short confirmation.
  • Use iOS Native Modal for a task with its own screen.
  • Use the Popover hint for short help.

Installation

Run this from your app's root. If SwipeUI isn't set up yet, run npx @swipeui/cli init first; it sets up Uniwind, the theme tokens and the cn helper.

npx @swipeui/cli add sheet
  • Adds components/swipeui/sheet/sheet.tsx, components/swipeui/sheet/sheet-support.ts and 7 shared helpers.
  • Installs @expo/ui, @gorhom/bottom-sheet, react-native-gesture-handler, react-native-reanimated, react-native-worklets, react-native-safe-area-context, uniwind, expo-blur, clsx, tailwind-merge, class-variance-authority. In Expo apps it uses npx expo install so versions match your SDK.

Usage

import { Sheet, SheetScrollView } from '@/components/swipeui/sheet/sheet';

<Sheet
  presentation="attached"
  title="Saved routes"
  open={open}
  onOpenChange={setOpen}
  snapPoints={['half', 'full']}
>
  <SheetScrollView>{routeRows}</SheetScrollView>
</Sheet>;

Place SheetProvider inside the app's gesture root and safe-area provider for attached sheets. Keep the screen's state and actions in its component.

SettingDefaultBehavior
presentationPlatform defaultUse attached for an edge panel or detached for the system half sheet in the active theme’s background color. iOS controls the system inset.
open, defaultOpen, onOpenChangeClosedDrive or observe visibility.
snapPoints, initialSnapIndex, onSnapChangeFit contentSet resting heights from smallest to largest. Use the attached presentation to choose and observe the active index.
backdrop, backdropStyleOn, dimHide the backdrop or choose dim or blur for an attached sheet.
blurIntensity, blurTarget45, no targetAdjust strength. On Android, pass the ref of the background blur target. On devices without blur support, or when Reduce Transparency is on, the backdrop dims.
dismissible, showHandleOnConfigure available dismissal and the grabber. Keep a visible completion action in a locked sheet.
returnFocusRefUnsetRestore focus to the control that launched the sheet.
title, labelUnsetProvide a heading or accessible name.
keyboardBehavior, motionPlatform or theme defaultTune the keyboard and motion on attached sheets.

Use a short body for Basic or Detached. Set scrollable and use SheetScrollView with two or more heights for a long list. See Overlay recipes for filters and sharing.

Keep a fixed header and footer around SheetScrollView when a long picker needs its title, close control and primary action visible at every snap point. Set showHandle={false} when a custom header is the surface's top edge. Use SheetTextInput for an input that participates in the sheet's keyboard handling. Detached sheets preserve the system appearance and can use an optional blur layer behind the presentation.

Behavior and gestures

  • Drag a resizable sheet between snap points.
  • Swipe down or use the available dismissal action to close.

Accessibility

  • The content is marked modal for screen readers and the title is read as a header.
  • The escape gesture (two-finger Z on iOS) closes a dismissible sheet.
  • Android's back button closes a dismissible sheet with either engine.
  • It uses the popover colour tokens in light and dark.

Motion

  • Uses the overlay and drag motion roles, so it follows your app's feel. Pass motion to tune this one instance.
  • Attached sheets follow app motion settings. Detached sheets use platform motion.

Performance

  • Content mounts only while open; native sheets are drawn by the OS.

Notes for AI

  • Set presentation to attached for themed sheets or detached for the inset system presentation.
  • Use backdropStyle to choose dim or blur. Supply a blur target on Android.

Compatibility

Runs onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items