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

Dropdown package for react-native

  • 0.4.0
  • Source
  • npm
  • Socket score

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

react-native-select

Dropdown package for react-native

Installation

npm install react-native-select

Demo

Multiple SelectSingle Select

Usage

import * as React from 'react';

import { StyleSheet, View } from 'react-native';
import DropdownSelect from 'react-native-select';

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

  return (
      <DropdownSelect
        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={result}
        onValueChange={(itemValue) => setResult(itemValue)}
      />
  );
}
ProptypesDatatypeExample
labelstringCountries
placeholderstringSelect a country
optionsArray[{ name: 'Albania', code: 'AL' }, { name: 'Åland Islands', code: 'AX' }]
optionLabelstringname
optionValuestringcode
selectedValuestring or ArrayAL or [AL, AX]
onValueChangefunction()=>{
isMultipleBooleantrue
labelStyleObject{backgroundColor: 'red', borderRadius: 0, ...}
dropdownStyleObject{backgroundColor: 'red', margin: 5, ...}
dropdownContainerStyleObject{backgroundColor: 'red', borderRadius: 0, ...}
selectedItemStyleObject{backgroundColor: 'red', color: 'yellow', ...}
modalBackgroundStyleObject{backgroundColor: 'blue', ...}
modalOptionsContainerObject{padding: 5}

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 04 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