All Projects → AdelRedaa97 → react-native-select-dropdown

AdelRedaa97 / react-native-select-dropdown

Licence: MIT license
react-native-select-dropdown is a highly customized dropdown | select | picker | menu for react native that works for andriod and iOS platforms.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-select-dropdown

Flutter smart select
SmartSelect allows you to easily convert your usual form select or dropdown into dynamic page, popup dialog, or sliding bottom sheet with various choices input such as radio, checkbox, switch, chips, or even custom input. Supports single and multiple choice.
Stars: ✭ 179 (+14.74%)
Mutual labels:  select, dropdown
react-multi-select-component
Lightweight (~5KB gzipped) multiple selection dropdown component
Stars: ✭ 279 (+78.85%)
Mutual labels:  select, dropdown
Vue Treeselect
A multi-select component with nested options support for Vue.js
Stars: ✭ 2,347 (+1404.49%)
Mutual labels:  select, dropdown
Bootstrap Select
🚀 The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more.
Stars: ✭ 9,442 (+5952.56%)
Mutual labels:  select, dropdown
vue-tags-component
Vue.js 2+ tags component
Stars: ✭ 27 (-82.69%)
Mutual labels:  select, dropdown
Downshift
🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.
Stars: ✭ 10,183 (+6427.56%)
Mutual labels:  select, dropdown
insect
🛠 Highly customisable, minimalistic input x select field for React.
Stars: ✭ 33 (-78.85%)
Mutual labels:  select, dropdown
Ngx Select Dropdown
Custom Dropdown for Angular 4+ with multiple and single selection options
Stars: ✭ 91 (-41.67%)
Mutual labels:  select, dropdown
Ng Select
⭐ Native angular select component
Stars: ✭ 2,781 (+1682.69%)
Mutual labels:  select, dropdown
React Native Dropdown Picker
A single / multiple, categorizable & searchable item picker (dropdown) component for react native which supports both Android & iOS.
Stars: ✭ 230 (+47.44%)
Mutual labels:  select, dropdown
React Responsive Select
A customisable, touchable, React select / multi-select form control. Built with keyboard and screen reader accessibility in mind
Stars: ✭ 98 (-37.18%)
Mutual labels:  select, dropdown
react-native-autocomplete-dropdown
Dropdown Item picker with search and autocomplete (typeahead) functionality for react native
Stars: ✭ 87 (-44.23%)
Mutual labels:  select, dropdown
Pretty Dropdowns
A simple, lightweight jQuery plugin to create stylized drop-down menus.
Stars: ✭ 96 (-38.46%)
Mutual labels:  select, dropdown
React Select Me
Fast 🐆. Lightweight 🐜. Configurable 🐙. Easy to use 🦄. Give it a shot 👉🏼
Stars: ✭ 119 (-23.72%)
Mutual labels:  select, dropdown
Multiselect
Vue 3 multiselect component with single select, multiselect and tagging options.
Stars: ✭ 92 (-41.03%)
Mutual labels:  select, dropdown
Angular2 Multiselect Dropdown
Angular 2 Dropdown Multiselect
Stars: ✭ 225 (+44.23%)
Mutual labels:  select, dropdown
React Native Picker Select
🔽 A Picker component for React Native which emulates the native <select> interfaces for iOS and Android
Stars: ✭ 1,229 (+687.82%)
Mutual labels:  select, dropdown
Autocomplete
🔮 Fast and full-featured autocomplete library
Stars: ✭ 1,268 (+712.82%)
Mutual labels:  select, dropdown
React Dropdown Select
Customisable dropdown select for react
Stars: ✭ 227 (+45.51%)
Mutual labels:  select, dropdown
tagselector
Dependency-free JS library that turns select fields in customizable tag clouds
Stars: ✭ 19 (-87.82%)
Mutual labels:  select, dropdown

react-native-select-dropdown

react-native-select-dropdown is a highly customized dropdown | select | picker | menu for react native that works for andriod and iOS platforms.

Installation

# Using npm

npm install react-native-select-dropdown

# Using yarn

yarn add react-native-select-dropdown

Demo

Code provided in Examples folder.

Search Functionality (Code provided in Examples folder).

Usage

import SelectDropdown from 'react-native-select-dropdown'
...
const countries = ["Egypt", "Canada", "Australia", "Ireland"]
...
<SelectDropdown
	data={countries}
	onSelect={(selectedItem, index) => {
		console.log(selectedItem, index)
	}}
	buttonTextAfterSelection={(selectedItem, index) => {
		// text represented after item is selected
		// if data array is an array of objects then return selectedItem.property to render after item is selected
		return selectedItem
	}}
	rowTextForSelection={(item, index) => {
		// text represented for each item in dropdown
		// if data array is an array of objects then return item.property to represent item in dropdown
		return item
	}}
/>

Props

Methods


data

array of data that will be represented in dropdown 'can be array of objects

Type Required
array Yes

onSelect

function recieves selected item and its index in data array

Type Required
function Yes

defaultButtonText

default button text when no item is selected

Type Required
String No

buttonTextAfterSelection

function recieves selected item and its index, this function should return a string that will be represented in button after item is selected

Type Required
function Yes "unless you customized button using renderCustomizedButtonChild"

rowTextForSelection

function recieves item and index for each row in dropdown, this function shoud return a string that will be represented in each row in dropdown

Type Required
function Yes "unless you customized button using renderCustomizedRowChild"

defaultValue

default selected item in dropdown ( check examples in Demo1)

Type Required
any No

defaultValueByIndex

default selected item index

Type Required
integer No

disabled

disable dropdown

Type Required
boolean No

disableAutoScroll

disable auto scroll to selected value

Type Required
boolean No

onFocus

function fires when dropdown is opened

Type Required
function No

onBlur

function fires when dropdown is closed

Type Required
function No

onScrollEndReached

function fires when dropdown scrolls to the end (for paginations)

Type Required
function No

buttonStyle

style object for button

Type Required
object Yes

buttonTextStyle

style object for button text

Type Required
object No

renderCustomizedButtonChild

function recieves selected item and its index, this function should return a React component as a child for dropdown button buttonStyle should be used for parent button view style.

# check examples folder to make things clear

Type Required
function No

renderDropdownIcon

function that should return a React component for dropdown icon

Type Required
function No

dropdownIconPosition

dropdown icon position "left" || "right"

Type Required
string No

statusBarTranslucent

required to set true when statusbar is translucent (android only)

Type Required
boolean No

dropdownStyle

style object for dropdown view

Type Required
object No

dropdownOverlayColor

backdrop color when dropdown is opened

Type Required
string No

dropdownBackgroundColor

background color behind list items when dropdown is opened

Type Required
string No

rowStyle

style object for row

Type Required
object Yes

rowTextStyle

style object for row text

Type Required
object No

selectedRowStyle

style object for selected row

Type Required
object Yes

selectedRowTextStyle

style object for selected row text

Type Required
object No

renderCustomizedRowChild

function recieves item and its index, this function should return React component as a child for customized row rowStyle should be used for parent row view style.

# check examples folder to make things clear

Type Required
function No

search

enable search functionality

Type Required
boolean No

searchInputStyle

style object for search input

Type Required
object Yes

searchInputTxtColor

text color for search input

Type Required
string No

searchPlaceHolder

placeholder text for search input

Type Required
string No

searchPlaceHolderColor

text color for search input placeholder

Type Required
string No

renderSearchInputLeftIcon

function returns React component for search input icon

Type Required
function No

renderSearchInputRightIcon

function returns React component for search input icon

Type Required
function No

onChangeSearchInputText

function callback when the search input text changes, this will automatically disable the dropdown's internal search to be implemented manually outside the component

Type Required
function No

Method Description
reset() Remove selection & reset it to display defaultButtonText check #1 (comment).
openDropdown() Open the dropdown.
closeDropdown() Close the dropdown.
selectIndex(index) Select a specific item by index.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].