Components

DropdownMenu

Menu popup component with items, separators, and destructive actions.

iOSAndroid
Preview DropdownMenu 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-dropdown-menu
Required Packages(1 package)
pnpm add react-native-reanimated

Usage

import { DropdownMenu } from '@/components/docyrus-native/dropdown-menu';

<DropdownMenu
  trigger={<Button>Options</Button>}
  items={[
    { label: 'Edit', onPress: handleEdit },
    { label: 'Duplicate', onPress: handleDuplicate },
    { type: 'separator' },
    { label: 'Delete', onPress: handleDelete, destructive: true },
  ]}
/>

API Reference

PropTypeDefaultDescription
triggerReactNode—Trigger element (required)
itemsDropdownMenuEntry[]—Menu items and separators (required)
align'start' | 'end'—Menu alignment
classNamestring—Additional CSS classes
menuClassNamestring—Menu panel CSS classes
PropertyTypeDescription
labelstringItem label
iconReactNodeOptional icon
onPress() => voidPress handler
destructivebooleanDestructive action styling
disabledbooleanDisable this item
PropertyTypeDescription
type'separator'Separator marker

Type Exports

TypeDescription
DropdownMenuPropsProps for DropdownMenu
DropdownMenuItemMenu item type
DropdownMenuSeparatorSeparator type
DropdownMenuEntryUnion of item and separator

On this page