Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
react-native-input-select
Advanced tools
Dropdown package for react-native
npm install react-native-select
Multiple Select | Single Select |
---|---|
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)}
/>
);
}
Proptypes | Datatype | Example |
---|---|---|
label | string | Countries |
placeholder | string | Select a country |
options | Array | [{ name: 'Albania', code: 'AL' }, { name: 'Åland Islands', code: 'AX' }] |
optionLabel | string | name |
optionValue | string | code |
selectedValue | string or Array | AL or [AL, AX] |
onValueChange | function | ()=>{ |
isMultiple | Boolean | true |
labelStyle | Object | {backgroundColor: 'red', borderRadius: 0, ...} |
dropdownStyle | Object | {backgroundColor: 'red', margin: 5, ...} |
dropdownContainerStyle | Object | {backgroundColor: 'red', borderRadius: 0, ...} |
selectedItemStyle | Object | {backgroundColor: 'red', color: 'yellow', ...} |
modalBackgroundStyle | Object | {backgroundColor: 'blue', ...} |
modalOptionsContainer | Object | {padding: 5} |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
A customizable dropdown selection package for react-native for android and iOS with multiple select and search capabilities.
The npm package react-native-input-select receives a total of 1,652 weekly downloads. As such, react-native-input-select popularity was classified as popular.
We found that react-native-input-select demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.