Archived. This repo holds a v6.0.0 TypeScript rewrite of a dropdown picker originally derived from the now-stale
react-native-dropdown-pickerecosystem. No longer published, maintained, or accepting contributions.
A single/multi-select dropdown for React Native:
- TypeScript-first, strict mode, no escape hatches
- Generic over
T extends ValueTypewith a discriminated-union prop type for single vs multi-select - List modes: FlatList (default), ScrollView, Modal
- Optional search with normalized matching (handles regional accents)
and
addCustomItemviafastest-levenshteindistance sort - Optional category/parent items, sticky headers, item separators
- RTL aware
- Consumer-controlled placeholders/copy (no built-in i18n layer)
import { useState } from 'react';
import { View, Text } from 'react-native';
import DropDownPicker, { ItemType } from 'react-native-dropdown-picker-plus';
const ITEMS: Array<ItemType<string>> = [
{ label: 'Apple', value: 'apple' },
{ label: 'Banana', value: 'banana' },
{ label: 'Pear', value: 'pear' },
];
export default function App() {
const [open, setOpen] = useState(false);
const [value, setValue] = useState<string | null>(null);
return (
<View style={{ flex: 1 }}>
<DropDownPicker
open={open}
value={value}
items={ITEMS}
setOpen={setOpen}
setValue={setValue}
placeholder="Choose a fruit"
/>
<Text>Chosen fruit: {value ?? 'none'}</Text>
</View>
);
}<DropDownPicker> re-exports its prop types — see index.ts for the full surface.
This is a hard fork. Breaking on purpose:
- Removed:
mode='BADGE'+ the entire badge renderer - Removed:
themeprop +DARKtheme +setTheme/addTheme/Picker.THEMES(use your own theming layer) - Removed:
language/translationprops +Picker.LANGUAGE/setLanguage/addTranslation/modifyTranslation(passplaceholder,searchPlaceholder,multipleTextdirectly) - Removed:
MODEconstant +setMode(was a one-value enum after BADGE went) - Removed:
SCHEMAstatic and the hand-writtenindex.d.ts(types now flow from source) - Converted: every source file from JavaScript to TypeScript under full
strict mode (
strict,noUncheckedIndexedAccess,noPropertyAccessFromIndexSignature,noUnusedLocals,noImplicitReturns) - Replaced: hand-rolled arrow icon memo with a typed
<PickerArrow />component
MIT. See LICENSE.