Components

Select

Dropdown select component with modal picker for option selection.

iOSAndroid
Preview Select 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-select

Usage

import { Select } from '@/components/docyrus-native/select';

const options = [
  { label: 'Apple', value: 'apple' },
  { label: 'Banana', value: 'banana' },
  { label: 'Cherry', value: 'cherry' },
];

<Select
  options={options}
  value={fruit}
  onValueChange={setFruit}
  title="Select Fruit"
/>

API Reference

PropTypeDefaultDescription
optionsSelectOption[]—Array of options (required)
valuestring—Selected option value
onValueChange(value: string) => void—Selection change handler
placeholderstring'Select...' (translated)Placeholder text
disabledbooleanfalseDisable interaction
size'sm' | 'md' | 'lg''md'Trigger size
titlestring—Modal header title
classNamestring—Trigger CSS classes
textClassNamestring—Trigger text CSS classes
accessibilityLabelstring—Accessibility label

SelectOption

PropertyTypeDescription
labelstringDisplay text
valuestringOption value
disabledbooleanDisable this option

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.select.placeholderSelect...Trigger text when nothing is selected (placeholder prop wins)
ui.select.currentSelectionCurrent selectionHint under the selected option
ui.select.tapToChooseTap to chooseHint under the other options

Type Exports

TypeDescription
SelectPropsProps for Select component
SelectOptionOption item type
SelectSize'sm' | 'md' | 'lg'

On this page