Gathering detailed insights and metrics for react-native-paper-dropdown
Gathering detailed insights and metrics for react-native-paper-dropdown
Gathering detailed insights and metrics for react-native-paper-dropdown
Gathering detailed insights and metrics for react-native-paper-dropdown
react-native-paper-select
Material Design Select Dropdown Component using React Native Paper
@longphung/react-native-paper-dropdown
Dropdown component using React Native Paper TextInput and Menu, now also with multiselect
react-native-paper-dropdown-updated
Dropdown component using React Native Paper TextInput and Menu, now also with multiselect
@fringecoding/react-native-paper-dropdown
A fork of Fateh Farooqui's react-native-paper-dropdown with additional configurability
npm install react-native-paper-dropdown
56
Supply Chain
61.8
Quality
76.6
Maintenance
50
Vulnerability
94.8
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
136 Stars
79 Commits
74 Forks
1 Watching
5 Branches
3 Contributors
Updated on 25 Nov 2024
Minified
Minified + Gzipped
TypeScript (92.77%)
JavaScript (7.23%)
Cumulative downloads
Total Downloads
Last day
13.2%
1,501
Compared to previous day
Last week
12.1%
7,235
Compared to previous week
Last month
14.7%
31,177
Compared to previous month
Last year
19.9%
286,835
Compared to previous year
1
3
Material Design Dropdown Component using React Native Paper, now also with multiselect
1react-native-paper
1yarn add react-native-paper-dropdown
or
1npm i react-native-paper-dropdown
1import React, { useState } from 'react'; 2import { View } from 'react-native'; 3import { Dropdown } from 'react-native-paper-dropdown'; 4import { Provider as PaperProvider } from 'react-native-paper'; 5 6const OPTIONS = [ 7 { label: 'Male', value: 'male' }, 8 { label: 'Female', value: 'female' }, 9 { label: 'Other', value: 'other' }, 10]; 11 12export default function App() { 13 const [gender, setGender] = useState<string>(); 14 15 return ( 16 <PaperProvider> 17 <View style={{ margin: 16 }}> 18 <Dropdown 19 label="Gender" 20 placeholder="Select Gender" 21 options={OPTIONS} 22 value={gender} 23 onSelect={setGender} 24 /> 25 </View> 26 </PaperProvider> 27 ); 28}
1import React, { useState } from 'react'; 2import { View } from 'react-native'; 3import { MultiSelectDropdown } from 'react-native-paper-dropdown'; 4import { Provider as PaperProvider } from 'react-native-paper'; 5 6const MULTI_SELECT_OPTIONS = [ 7 { label: 'White', value: 'white' }, 8 { label: 'Red', value: 'red' }, 9 { label: 'Blue', value: 'blue' }, 10 { label: 'Green', value: 'green' }, 11 { label: 'Orange', value: 'orange' }, 12]; 13 14export default function App() { 15 const [colors, setColors] = useState<string[]>([]); 16 17 return ( 18 <PaperProvider> 19 <View style={{ margin: 16 }}> 20 <MultiSelectDropdown 21 label="Colors" 22 placeholder="Select Colors" 23 options={MULTI_SELECT_OPTIONS} 24 value={colors} 25 onSelect={setColors} 26 /> 27 </View> 28 </PaperProvider> 29 ); 30}
DropdownProps
Prop | Type | Description |
---|---|---|
testID | string | Test ID for the dropdown component. |
menuTestID | string | Test ID for the dropdown menu. |
value | string | The currently selected value. |
onSelect | (value: string) => void | Callback function to handle value selection. |
options | Option[] | Array of options for the dropdown. |
menuUpIcon | JSX.Element | Custom icon for menu up state. |
menuDownIcon | JSX.Element | Custom icon for menu down state. |
maxMenuHeight | number | Maximum height of the dropdown menu. |
menuContentStyle | ViewStyle | Style for the dropdown menu content. |
CustomDropdownItem | (props: DropdownItemProps) => JSX.Element | Custom component for dropdown item. |
CustomDropdownInput | (props: DropdownInputProps) => JSX.Element | Custom component for dropdown input. |
CustomMenuHeader | (props: DropdownHeaderProps) => JSX.Element | Custom component for the dropdown menu header. |
Touchable | ForwardRefExoticComponent<PressableProps & RefAttributes<View>> | Custom touchable component for the dropdown. |
placeholder | string | Placeholder text for the dropdown input. |
label | TextInputLabelProp | Label for the dropdown input. |
mode | 'flat' | 'outlined' | Mode for the dropdown input. |
disabled | boolean | Whether the dropdown is disabled. |
error | boolean | Whether the dropdown has an error. |
hideMenuHeader | boolean | Hide menu header component (default: false). |
statusBarHeight | number | Additional top margin for the status bar on Android. |
MultiSelectDropdownProps
Prop | Type | Description |
---|---|---|
testID | string | Test ID for the dropdown component. |
menuTestID | string | Test ID for the dropdown menu. |
value | string[] | The currently selected values. |
onSelect | (value: string[]) => void | Callback function to handle value selection. |
options | Option[] | Array of options for the dropdown. |
menuUpIcon | JSX.Element | Custom icon for menu up state. |
menuDownIcon | JSX.Element | Custom icon for menu down state. |
Touchable | ForwardRefExoticComponent<PressableProps & RefAttributes<View>> | Custom touchable component for the dropdown. |
maxMenuHeight | number | Maximum height of the dropdown menu. |
menuContentStyle | ViewStyle | Style for the dropdown menu content. |
CustomMultiSelectDropdownItem | (props: MultiSelectDropdownItemProps) => JSX.Element | Custom component for multi-select dropdown item. |
CustomMultiSelectDropdownInput | (props: DropdownInputProps) => JSX.Element | Custom component for multi-select dropdown input. |
CustomMenuHeader | (props: DropdownHeaderProps) => JSX.Element | Custom component for the dropdown menu header. |
placeholder | string | Placeholder text for the dropdown input. |
label | TextInputLabelProp | Label for the dropdown input. |
mode | 'flat' | 'outlined' | Mode for the dropdown input. |
disabled | boolean | Whether the dropdown is disabled. |
error | boolean | Whether the dropdown has an error. |
hideMenuHeader | boolean | Hide menu header component (default: false). |
statusBarHeight | number | Additional top margin for the status bar on Android. |
Method | Return | Description |
---|---|---|
focus() | void | Open the dropdown manually. |
blur() | void | Close the dropdown manually. |
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 2
Reason
9 existing vulnerabilities detected
Details
Reason
Found 2/24 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More