Back to rankings

hossein-zare/react-native-dropdown-picker

JavaScripthossein-zare.github.io/react-native-dropdown-picker-website/

A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.

pickerdropdownmenureact-nativeandroidiosjavascriptselectmultiplesinglesearchableplaceholder
Star Growth
Stars
1k
Forks
306
Weekly Growth
Issues
149
5001k
Apr 2020May 2022Jun 2024Jul 2026
Artifactsnpmnpm install react-native-dropdown-picker
README

React Native Dropdown Picker

GitHub repo Build Status PRs welcome react-native-dropdown-picker is released under the MIT license. Current npm package version. Weekly npm downloads Documentation


📱 Screenshots

Screenshot showing basic dropdown Screenshot showing badges Screenshot showing dark theme and parent items

The above screenshots were taken from this example.

👋 Usage

Basic usage

The following code shows basic usage of this library:

import React, {useState} from 'react';
import {View, Text} from 'react-native';
import DropDownPicker from 'react-native-dropdown-picker';

export default function App() {
    const [open, setOpen] = useState(false);
    const [value, setValue] = useState(null);
    const [items, setItems] = useState([
        {label: 'Apple', value: 'apple'},
        {label: 'Banana', value: 'banana'},
        {label: 'Pear', value: 'pear'},
    ]);

    return (
        <View style={{flex: 1}}>
            <View
                style={{
                    flex: 1,
                    alignItems: 'center',
                    justifyContent: 'center',
                    paddingHorizontal: 15,
                }}>
                <DropDownPicker
                    open={open}
                    value={value}
                    items={items}
                    setOpen={setOpen}
                    setValue={setValue}
                    setItems={setItems}
                    placeholder={'Choose a fruit.'}
                />
            </View>

            <View style={{
                flex: 1,
                alignItems: 'center',
                justifyContent: 'center'
            }}>
                <Text>Chosen fruit: {value === null ? 'none' : value}</Text>
            </View>
        </View>
    );
}

Further information on usage

You can find more examples in the examples subdirectory. This subdirectory is a working Expo project demonstrating this library. It shows how to use this library with class components as well as with function components, and in TypeScript as well as in JavaScript. Navigate into the examples subdirectory, run npm install, and then run npx expo start to see the examples working.

For further information on how to use this library, read the usage documentation.

📄 Further documentation

The docs can be read at: https://hossein-zare.github.io/react-native-dropdown-picker-website

The docs can be edited at: https://github.com/hossein-zare/react-native-dropdown-picker-website

😕 Support and issues

If you have questions or need help, you can ask a question on Stack Overflow or make a GitHub issue. You can also make a GitHub issue to report a bug or make a feature request.

🚀️ Contributing

See CONTRIBUTING.md.

Related repositories
LuckSiege/PictureSelector

Picture Selector Library for Android or 图片选择器

JavaMavenApache License 2.0androidandroid-image-selector
13.6k3.1k
missive/emoji-mart

🏪 One component to pick them all

TypeScriptnpmMIT Licenseemoji-pickeremoji
missiveapp.com/open/emoji-mart
9.4k904
react-native-image-picker/react-native-image-picker

:sunrise_over_mountains: A React Native module that allows you to use native UI to select media from the device library or directly from the camera.

JavaMavenMIT Licensereact-nativeimage-picker
8.6k2.1k
Hacker0x01/react-datepicker

A simple and reusable datepicker component for React

TypeScriptnpmMIT Licensedatepicker-componentreact
reactdatepicker.com
8.4k2.3k
amsul/pickadate.js

The mobile-friendly, responsive, and lightweight jQuery date & time input picker.

JavaScriptnpmMIT Licensepickerdate
amsul.ca/pickadate.js
7.7k984
Eonasdan/tempus-dominus

This project is no longer active or supported.

HTMLMIT Licensepickertempus-dominus
getdatepicker.com
7.2k4.3k
gzu-liyujiang/AndroidPicker

安卓选择器类库,包括日期及时间选择器(可用于出生日期、营业时间等)、单项选择器(可用于性别、民族、职业、学历、星座等)、二三级联动选择器(可用于车牌号、基金定投日期等)、城市地址选择器(分省级、地市级及区县级)、数字选择器(可用于年龄、身高、体重、温度等)、日历选日期择器(可用于酒店及机票预定日期)、颜色选择器、文件及目录选择器、图片选择器等……WheelPicker/DatePicker/TimePicker/OptionPicker/NumberPicker/LinkagePicker/AddressPicker/CarPlatePicker/CalendarPicker/ColorPicker/FilePicker/ImagePicker etc.

JavaMavenOtherwheelviewpicker
6.8k1.5k
dillidon/alerts-and-pickers

Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...

SwiftMIT Licenseuialertcontrollerpicker
5.8k702
longitachi/ZLPhotoBrowser

Wechat-like image picker. Support select photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;

SwiftApache License 2.0imagepickereditimage
5k1k
wdullaer/MaterialDateTimePicker

Pick a date or time on Android in style

JavaMavenApache License 2.0material-designandroid-library
4.6k932
Yummypets/YPImagePicker

📸 Instagram-like image picker & filters for iOS

SwiftMIT Licenseimagepickerpicker
4.5k1k
simonwep/pickr

🎨 Pickr - A simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!

JavaScriptnpmMIT Licensecolor-pickercolorpicker
simonwep.github.io/pickr
4.5k291