All Projects → sauzy34 → react-native-multi-selectbox

sauzy34 / react-native-multi-selectbox

Licence: MIT license
Platform independent (Android / iOS) Selectbox | Picker | Multi-select | Multi-picker. The idea is to bring out the common user interface & user experience on both platforms.

Programming Languages

javascript
184084 projects - #8 most used programming language
java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language
Starlark
911 projects

Projects that are alternatives of or similar to react-native-multi-selectbox

react-native-select-pro
React Native dropdown (select) component developed by Mobile Reality
Stars: ✭ 79 (-53.25%)
Mutual labels:  dropdown, picker, react-native-component, expo
React Native Modal Dropdown
A react-native dropdown/picker/selector component for both Android & iOS.
Stars: ✭ 1,103 (+552.66%)
Mutual labels:  dropdown, picker, react-native-component
React Native Number Please
🔢 Generate react-native pickers with range numbers.
Stars: ✭ 30 (-82.25%)
Mutual labels:  dropdown, picker, expo
react-native-value-picker
Cross-Platform iOS(ish) style picker for react native.
Stars: ✭ 18 (-89.35%)
Mutual labels:  picker, react-native-component
react-native-picker-box
Simple and configurable component picker for react native
Stars: ✭ 0 (-100%)
Mutual labels:  dropdown, picker
react-native-multiple-select
Customizable & Animated, Easy to Use Multiple Select Library for React Native
Stars: ✭ 31 (-81.66%)
Mutual labels:  picker, multi-select
expo-ui-kit
expo-ui-kit - a components based React-Native UI Kit
Stars: ✭ 88 (-47.93%)
Mutual labels:  react-native-component, expo
react-functional-select
Micro-sized & micro-optimized select component for React.js
Stars: ✭ 165 (-2.37%)
Mutual labels:  dropdown, multi-select
Mkdropdownmenu
🔻 Dropdown Menu for iOS with many customizable parameters to suit any needs
Stars: ✭ 523 (+209.47%)
Mutual labels:  dropdown, picker
React Native Picker Select
🔽 A Picker component for React Native which emulates the native <select> interfaces for iOS and Android
Stars: ✭ 1,229 (+627.22%)
Mutual labels:  dropdown, picker
Re Spinner
A spinner that supports item click events
Stars: ✭ 19 (-88.76%)
Mutual labels:  dropdown, picker
react-native-smart-picker
React Native Smart Picker is easy wrapper for React Native Picker. Allows toggling the picker open and closed on iOS and native behaviour on Android.
Stars: ✭ 19 (-88.76%)
Mutual labels:  dropdown, picker
React Native Dropdown Picker
A single / multiple, categorizable & searchable item picker (dropdown) component for react native which supports both Android & iOS.
Stars: ✭ 230 (+36.09%)
Mutual labels:  dropdown, picker
csc picker
A flutter package to display a country, states, and cities. In addition it gives the possibility to select a list of countries, States and Cities depends on Selected, also you can search country, state, and city all around the world.
Stars: ✭ 25 (-85.21%)
Mutual labels:  dropdown, picker
react-multi-select-component
Lightweight (~5KB gzipped) multiple selection dropdown component
Stars: ✭ 279 (+65.09%)
Mutual labels:  dropdown
vue-daterangepicker-component
Date range picker for Vue 1.x, based on bootstrap-daterangepicker
Stars: ✭ 22 (-86.98%)
Mutual labels:  picker
proffy
React Native + ReactJS + NodeJS project developed on RocketSeat NexLevelWeek. This project is based on an application for connect students and teachers.
Stars: ✭ 30 (-82.25%)
Mutual labels:  expo
floating-ui
A low-level toolkit to create floating elements. Tooltips, popovers, dropdowns, and more
Stars: ✭ 23,485 (+13796.45%)
Mutual labels:  dropdown
rn-mirror-lists
🪞 Mirror scroll lists for React Native
Stars: ✭ 38 (-77.51%)
Mutual labels:  expo
react-native-appsync-s3
React Native app for image uploads to S3 and storing their records in Amazon DynamoDB using AWS Amplify and AppSync SDK
Stars: ✭ 18 (-89.35%)
Mutual labels:  expo

react-native-multi-selectbox

npm version npm downloads

Platform independent (Android / iOS) Selectbox | Picker | Multi-select | Multi-picker. The idea is to bring out the common user-interface & user-experience on both platforms.

demo

Getting started

How to install 🎹

npm install react-native-multi-selectbox

or

yarn add react-native-multi-selectbox

Usage 𖣠

import React, { useState } from 'react'
import { Text, View } from 'react-native'
import SelectBox from 'react-native-multi-selectbox'
import { xorBy } from 'lodash'

// Options data must contain 'item' & 'id' keys

const K_OPTIONS = [
  {
    item: 'Juventus',
    id: 'JUVE',
  },
  {
    item: 'Real Madrid',
    id: 'RM',
  },
  {
    item: 'Barcelona',
    id: 'BR',
  },
  {
    item: 'PSG',
    id: 'PSG',
  },
  {
    item: 'FC Bayern Munich',
    id: 'FBM',
  },
  {
    item: 'Manchester United FC',
    id: 'MUN',
  },
  {
    item: 'Manchester City FC',
    id: 'MCI',
  },
  {
    item: 'Everton FC',
    id: 'EVE',
  },
  {
    item: 'Tottenham Hotspur FC',
    id: 'TOT',
  },
  {
    item: 'Chelsea FC',
    id: 'CHE',
  },
  {
    item: 'Liverpool FC',
    id: 'LIV',
  },
  {
    item: 'Arsenal FC',
    id: 'ARS',
  },

  {
    item: 'Leicester City FC',
    id: 'LEI',
  },
]

function App() {
  const [selectedTeam, setSelectedTeam] = useState({})
  const [selectedTeams, setSelectedTeams] = useState([])
  return (
    <View style={{ margin: 30 }}>
      <View style={{ width: '100%', alignItems: 'center' }}>
        <Text style={{ fontSize: 30, paddingBottom: 20 }}>Demos</Text>
      </View>
      <Text style={{ fontSize: 20, paddingBottom: 10 }}>Select Demo</Text>
      <SelectBox
        label="Select single"
        options={K_OPTIONS}
        value={selectedTeam}
        onChange={onChange()}
        hideInputFilter={false}
      />
      <View style={{ height: 40 }} />
      <Text style={{ fontSize: 20, paddingBottom: 10 }}>MultiSelect Demo</Text>
      <SelectBox
        label="Select multiple"
        options={K_OPTIONS}
        selectedValues={selectedTeams}
        onMultiSelect={onMultiChange()}
        onTapClose={onMultiChange()}
        isMulti
      />
    </View>
  )

  function onMultiChange() {
    return (item) => setSelectedTeams(xorBy(selectedTeams, [item], 'id'))
  }

  function onChange() {
    return (val) => setSelectedTeam(val)
  }
}

export default App


Prop Type Default Value
label String Label
inputPlaceholder string Label
listEmptyText String "No results found"
width string "100%"
viewMargin string "0px"
isMulti boolean false
hideInputFilter boolean true
selectedValues array []
value array []
selectIcon component <Icon name={'downArrow'} />
labelStyle style object Default style
containerStyle style object Default style
inputFilterContainerStyle style object Default style
inputFilterStyle style object Default style
optionsLabelStyle style object Default style
optionContainerStyle style object Default style
multiOptionContainerStyle style object Default style
multiOptionsLabelStyle style object Default style
multiListEmptyLabelStyle style object Default style
listEmptyLabelStyle style object Default style
selectedItemStyle style object Default style
searchInputProps object Default props
multiSelectInputFieldProps object Default props
listOptionProps object Default props
arrowIconColor color string Default primary color
searchIconColor color string Default primary color
toggleIconColor color string Default primary color
options array [{ item: 'Juventus', id: 'JUVE'},{ item: 'Real Madrid', id: 'RM'},{ item: 'Barcelona', id: 'BR'},{ item: 'PSG', id: 'PSG'},{ item: 'FC Bayern Munich', id: 'FBM'}]

Want to be a contributor? 👷🏼‍♂️👷🏼‍♀️

Check-in develop branch and submit a new pull-request

Issues or feature request? ✍🏼

You can submit a request on https://github.com/sauzy34/react-native-multi-selectbox/issues

Support & Share 💆🏼‍♂️

Please star the repository on Github to enhance the reach to more developers.

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].