Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-input-select

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-input-select

A customizable dropdown selection package for react-native for android and iOS with multiple select and search capabilities.

  • 0.28.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2K
increased by9.33%
Maintainers
1
Weekly downloads
 
Created
Source

CodeQL

react-native-input-select

A fully customizable dropdown selection package for react-native android and iOS with multiple select and search capabilities.

Installation

With npm

npm install react-native-input-select

With yarn

yarn add react-native-input-select

Basic Usage

import React from 'react';
import Dropdown from 'react-native-input-select';

export default function App() {
  const [country, setCountry] = React.useState();

  return (
      <Dropdown
        label="Country"
        placeholder="Select an option..."
        options={[
          { name: 'Albania', code: 'AL' },
          { name: 'Åland Islands', code: 'AX' },
          { name: 'Algeria', code: 'DZ' },
          { name: 'American Samoa', code: 'AS' },
          { name: 'Andorra', code: 'AD' },
          { name: 'Angola', code: 'AO' },
          { name: 'Anguilla', code: 'AI' },
          { name: 'Antarctica', code: 'AQ' },
          { name: 'Antigua and Barbuda', code: 'AG' },
        ]}
        optionLabel={'name'}
        optionValue={'code'}
        selectedValue={country}
        onValueChange={(value) => setCountry(value)}
        primaryColor={'green'}
      />
  );
}

For more examples visit our wiki page

iOS

Screenshot 2023-03-23 at 5 11 54 PMScreenshot 2023-03-23 at 5 00 19 PMScreenshot 2023-03-23 at 5 00 29 PM
Screenshot 2023-03-23 at 5 00 35 PMScreenshot 2023-03-23 at 5 11 54 PMScreenshot 2023-04-06 at 5 26 46 PM

Android

Screenshot 2023-03-23 at 5 25 07 PMScreenshot 2023-03-23 at 5 26 58 PMScreenshot 2023-03-23 at 5 28 49 PM

Props

ProptypesDatatypeExample
labelstringCountries
placeholderstringSelect a country
optionsArray[{ name: 'Albania', code: 'AL' }, { name: 'Åland Islands', code: 'AX' }]
optionLabelstringname
optionValuestringcode
errorstringThis is a required field
helperTextstringOnly countries in the east are listed
selectedValuestring or ArrayAL or [AL, AX]
onValueChangefunction()=>{}
isMultipleBooleantrue
isSearchableBooleantrue
disabledBooleantrue
labelStyleObject{color: 'red', fontSize: 15, fontWeight: '500'}
placeholderStyleObject{color: 'red', fontSize: 15, fontWeight: '500'}
dropdownStyleObject{borderColor: 'blue', margin: 5, borderWidth:0 ...}
dropdownContainerStyleObject{backgroundColor: 'red', width: '30%', ...}
searchInputStyleObject{backgroundColor: 'red', borderRadius: 0, ...}
selectedItemStyleObject{backgroundColor: 'red', color: 'yellow', ...}
multipleSelectedItemStyleObject{backgroundColor: 'red', color: 'yellow', ...}
modalBackgroundStyleObject{backgroundColor: 'rgba(196, 198, 246, 0.5)'}
modalOptionsContainerObject{padding: 5}
dropdownErrorStyleObject{borderWidth: 2, borderStyle: 'solid'}
dropdownErrorTextStyleObject{color: 'red', fontWeight:'500'}
dropdownHelperTextStyleObject{color: 'green', fontWeight:'500'}
primaryColorstringblue
checkboxSizenumber20
checkboxStyleObject{backgroundColor: 'blue', borderRadius: 30, padding: 10}
checkboxLabelStyleObject{color: 'red', fontWeight:'500'}
listHeaderComponentReact Component<Text You can add any component to the top of this list <Text>
listFooterComponentReact Component<Text You can add any component to the bottom of this list <Text>

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Video Demo

https://user-images.githubusercontent.com/9849221/230516294-a1aca5a7-65f5-4d9c-9b7f-a057807cf35f.mov

Keywords

FAQs

Package last updated on 14 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc