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.12.0
  • Source
  • npm
  • Socket score

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

react-native-input-select

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

Installation

npm install react-native-input-select
yarn add react-native-input-select

Demo

Multiple SelectSingle Select

Usage

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

export default function App() {
  const [country, setCountry] = React.useState<number | undefined>();

  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'}
      />
  );
}

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
labelStyleObject{backgroundColor: 'red', borderRadius: 0, ...}
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: 'blue', ...}
modalOptionsContainerObject{padding: 5}
dropdownErrorStyleObject{borderWidth: 2, borderStyle: 'solid'}
dropdownErrorTextStyleObject{color: 'red', fontWeight:500}
dropdownHelperTextStyleObject{color: 'green', fontWeight:500}
primaryColorstringblue

Contributing

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

License

MIT

Keywords

FAQs

Package last updated on 09 Jan 2022

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