Gathering detailed insights and metrics for rn-modal-picker
Gathering detailed insights and metrics for rn-modal-picker
npm install rn-modal-picker
Typescript
Module System
Node Version
NPM Version
TypeScript (95.64%)
JavaScript (4.36%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
57,274
Last Day
18
Last Week
85
Last Month
442
Last Year
6,258
45 Stars
155 Commits
19 Forks
3 Watching
4 Branches
3 Contributors
Latest Version
0.4.9
Package Id
rn-modal-picker@0.4.9
Unpacked Size
833.82 kB
Size
610.78 kB
File Count
29
NPM Version
10.7.0
Node Version
22.1.0
Publised On
29 Jul 2024
Cumulative downloads
Total Downloads
Last day
-18.2%
18
Compared to previous day
Last week
-26.1%
85
Compared to previous week
Last month
36.4%
442
Compared to previous month
Last year
-4.3%
6,258
Compared to previous year
2
Android | iOS | Web |
---|---|---|
npm i rn-modal-picker
1import React, { useState } from "react"; 2import { Platform, StyleSheet, Text, View } from "react-native"; 3import ModalPicker from "rn-modal-picker"; 4 5const dataSource = [ 6 { 7 id: 1, 8 name: "Afghanistan", 9 }, 10 { 11 id: 2, 12 name: "Bahrain", 13 }, 14 { 15 id: 3, 16 name: "Canada", 17 }, 18 { 19 id: 4, 20 name: "Denmark", 21 }, 22 { 23 id: 5, 24 name: "Egypt", 25 }, 26 { 27 id: 6, 28 name: "France", 29 }, 30 { 31 id: 7, 32 name: "Greece", 33 }, 34 { 35 id: 8, 36 name: "Hong Kong", 37 }, 38 { 39 id: 9, 40 name: "India", 41 }, 42 { 43 id: 10, 44 name: "Japan", 45 } 46]; 47const App = () => { 48 const [value, setValue] = useState(""); 49 50 return ( 51 <View style={styles.container}> 52 <Text style={styles.titleText}>React Native Modal Picker</Text> 53 54 <ModalPicker 55 value={value} 56 data={dataSource} 57 animationType={"slide"} 58 pickerContainerStyle={styles.pickerStyle} 59 dropDownIcon={require("./res/ic_drop_down.png")} 60 selectedTextStyle={styles.selectedTextStyle} 61 listTextStyle={styles.listTextStyle} 62 placeHolderText={"Please select country"} 63 searchBarPlaceHolder={"Search......"} 64 searchBarPlaceHolderColor={"grey"} 65 placeHolderTextColor={"black"} 66 searchBarStyle={styles.searchBarStyle} 67 searchClearIcon={require("./res/ic_close.png")} 68 onChange={(value) => { 69 setValue(value); 70 }} 71 /> 72 </View> 73 ); 74}; 75export default App; 76 77const styles = StyleSheet.create({ 78 container: { 79 flex: 1, 80 justifyContent: "center", 81 alignItems: "center", 82 backgroundColor: "#F5FCFF", 83 }, 84 titleText: { 85 color: "#000", 86 fontSize: 25, 87 marginBottom: 25, 88 fontWeight: "bold", 89 }, 90 pickerStyle: { 91 height: 50, 92 width: "100%", 93 marginVertical: 10, 94 borderColor: "#303030", 95 alignItems: "center", 96 alignSelf: "center", 97 padding: 10, 98 backgroundColor: "white", 99 borderRadius: 5, 100 borderWidth: 1.5, 101 fontSize: 16, 102 color: "#000", 103 }, 104 selectedTextStyle: { 105 paddingLeft: 5, 106 color: "#000", 107 textAlign: "right", 108 }, 109 listTextStyle: { 110 color: "#000", 111 textAlign: "right", 112 }, 113 114 searchBarStyle: { 115 margin: 10, 116 padding: 10, 117 flexDirection: "row", 118 height: 45, 119 shadowOpacity: 1.0, 120 shadowRadius: 2, 121 shadowOffset: { 122 width: 1, 123 height: 1, 124 }, 125 backgroundColor: "rgba(255,255,255,1)", 126 shadowColor: Platform.OS === "ios" ? "rgba(0,0,0,0.3)" : "rgba(0,0,0,1)", 127 borderRadius: 10, 128 elevation: 5, 129 }, 130}); 131
Prop | Default | Type | Description | Required/Optional |
---|---|---|---|---|
data | [] | array | Array of objects with a unique id and name | Required |
hideSearchBar | false | bool | Show and hide search bar | Optional |
value | - | string | Set selected value otherwise its blank $ use for default value | Optional |
placeHolderText | - | string | Use to Show place holder hint text | Required |
pickerContainerStyle | - | object | Customize picker style | Required |
listTextStyle | - | object | Customize list item text style | Optional |
placeHolderTextColor | - | object | Customize placeholder text color | Optional |
itemSeparatorStyle | - | object | Style for Horizontal Line between item | Optional |
selectedTextStyle | - | object | Customize selected text style | Optional |
searchBarStyle | - | object | Customize Search bar Container style | Optional |
onChange | - | function | callback function received value from list selection | Required |
animationType | - | string [slide,none,fade] | Change Modal Animation | Optional |
disable | - | bool | Disable picker if you show default value and no need to change | Optional |
searchBarPlaceHolder | - | string | Search bar place holder text | Optional |
searchBarPlaceHolderColor | - | color code | Add color code | Optional |
dropDownIconStyle | - | object | Change drop down icon style color | Optional |
searchClearIcon | - | png/jpg | Change search bar text clear icon style | Optional |
searchIcon | - | png/jpg | Change search bar icon style color | Optional |
dropDownIcon | - | png/jpg | Change picker drop down icon | Optional |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
5 existing vulnerabilities detected
Details
Reason
Found 0/7 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- 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
license file not detected
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 2025-01-27
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