Expo

ActionSheet

iOS-style bottom sheet with gesture-driven interactions, multiple detents, and optional Liquid Glass effect.

iOSAndroid
Preview ActionSheet on your device

Scan with Expo Go

Download Expo Go, then scan the QR code to preview native components.

Installation

pnpm dlx @docyrus/cli add @docyrus/rn-action-sheet
# Optional: expo-glass-effect (for Liquid Glass variant on iOS 26+)
npx expo install expo-glass-effect
Required Packages(4 packages)
pnpm add react-native-gesture-handler react-native-reanimated react-native-worklets expo-glass-effect

Note: expo-glass-effect is optional. ActionSheet works fully without it — the glass variant gracefully falls back to the default variant when the module is not installed or when running on non-iOS 26+ devices.

Usage

import { ActionSheet } from '@/components/docyrus-native/action-sheet';

const [visible, setVisible] = useState(false);

<ActionSheet
  visible={visible}
  onClose={() => setVisible(false)}
  title="Choose an action"
  actions={[
    { key: 'edit', label: 'Edit', onPress: () => {} },
    { key: 'delete', label: 'Delete', destructive: true, onPress: () => {} },
  ]}
/>

Glass Variant (iOS 26+)

<ActionSheet
  visible={visible}
  onClose={() => setVisible(false)}
  variant="glass"
  glassEffectStyle="regular"
  title="Liquid Glass"
  actions={actions}
/>

Programmatic Control

Use SheetManager to show/hide sheets by ID without managing state directly:

import { ActionSheet, SheetManager } from '@/components/docyrus-native/action-sheet';

<ActionSheet
  visible={visible}
  onClose={() => setVisible(false)}
  sheetId="my-sheet"
/>

// From anywhere:
SheetManager.show('my-sheet');
SheetManager.hide('my-sheet');

Custom Content

Pass children instead of actions for fully custom sheet content:

<ActionSheet visible={visible} onClose={() => setVisible(false)} detent="large">
  <Text>Any custom content here</Text>
</ActionSheet>

API Reference

PropTypeDefaultDescription
visibleboolean—Whether the sheet is visible
onClose() => void—Callback when the sheet is closed
sheetIdstring—Unique ID for programmatic control via SheetManager
variant'default' | 'elevated' | 'minimal' | 'glass''default'Sheet visual style variant
detent'small' | 'medium' | 'large' | 'fit''medium'Sheet height detent
detentsActionSheetDetent[]—Array of detents for multi-stop snapping
titlestring—Sheet header title
messagestring—Sheet header message below the title
actionsActionSheetAction[]—Array of action items to display
showCancelbooleantrueShow the cancel button at the bottom
cancelLabelstring'Cancel'Custom label for the cancel button
showHandlebooleantrueShow the drag handle at the top
closeOnBackdropbooleantrueClose when tapping the backdrop
glassEffectStyle'regular' | 'prominent' | 'clear'—Glass blur style (only with variant="glass")
glassTintColorstring—Glass tint color override (only with variant="glass")
childrenReactNode—Custom content instead of actions
classNamestring—Additional CSS classes

ActionSheetAction

PropTypeDefaultDescription
keystring—Unique identifier for the action
labelstring—Action button text
iconstring—Emoji or text icon displayed before label
destructivebooleanfalseStyle as destructive (red text)
disabledbooleanfalseDisable the action
onPress() => void—Callback when the action is pressed

Translation Keys

Built-in copy is read through useUiTranslation() — provide these keys via <UiTranslationProvider>. Without a provider the English fallback is shown.

KeyEnglish fallbackUsed for
ui.common.cancelCancelCancel button (cancelLabel prop wins)

Type Exports

TypeDescription
ActionSheetPropsProps for ActionSheet component
ActionSheetActionAction item configuration
ActionSheetDetent'small' | 'medium' | 'large' | 'fit'

Compatibility

PlatformSupport
Expo GoYes (glass variant falls back to default)
Dev ClientYes
Bare RNYes (glass variant requires expo-glass-effect config plugin)

On this page