{"id":14965880,"url":"https://github.com/ugglr/react-native-value-picker","last_synced_at":"2025-09-10T05:14:03.839Z","repository":{"id":38847606,"uuid":"261938756","full_name":"ugglr/react-native-value-picker","owner":"ugglr","description":"Cross-Platform iOS(ish) style picker for react native. ","archived":false,"fork":false,"pushed_at":"2024-02-21T04:54:34.000Z","size":16680,"stargazers_count":20,"open_issues_count":9,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-04T10:34:02.908Z","etag":null,"topics":["android","javascript","npm","npm-package","npmjs","package","picker","react","react-component","react-components","react-hooks","react-native","react-native-component","yarn","yarn-package"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-value-picker","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ugglr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-07T03:19:34.000Z","updated_at":"2024-09-26T01:50:02.000Z","dependencies_parsed_at":"2023-10-03T12:41:03.362Z","dependency_job_id":"1aaab26e-68aa-4ff5-8f2b-08ee73bf5c59","html_url":"https://github.com/ugglr/react-native-value-picker","commit_stats":{"total_commits":43,"total_committers":3,"mean_commits":"14.333333333333334","dds":0.5116279069767442,"last_synced_commit":"9602adaa944eb983b6f2f5e8cce80727323e1cd8"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ugglr/react-native-value-picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ugglr%2Freact-native-value-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ugglr%2Freact-native-value-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ugglr%2Freact-native-value-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ugglr%2Freact-native-value-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ugglr","download_url":"https://codeload.github.com/ugglr/react-native-value-picker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ugglr%2Freact-native-value-picker/sbom","scorecard":{"id":907299,"data":{"date":"2025-08-11","repo":{"name":"github.com/ugglr/react-native-value-picker","commit":"00513efeea59b92c963f23c18f3cda5d34b2a7b5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 16 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/npm-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: examples/android/gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/ugglr/react-native-value-picker/npm-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/ugglr/react-native-value-picker/npm-publish.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"36 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-f5x2-xv93-4p23","Warn: Project is vulnerable to: GHSA-gmpm-xp43-f7g6","Warn: Project is vulnerable to: GHSA-pf27-929j-9pmm","Warn: Project is vulnerable to: GHSA-327c-qx3v-h673","Warn: Project is vulnerable to: GHSA-x4cf-6jr3-3qvp","Warn: Project is vulnerable to: GHSA-mph8-6787-r8hw","Warn: Project is vulnerable to: GHSA-7mhc-prgv-r3q4","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-2j79-8pqc-r7x6","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T17:48:04.309Z","repository_id":38847606,"created_at":"2025-08-24T17:48:04.310Z","updated_at":"2025-08-24T17:48:04.310Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274416428,"owners_count":25280949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","javascript","npm","npm-package","npmjs","package","picker","react","react-component","react-components","react-hooks","react-native","react-native-component","yarn","yarn-package"],"created_at":"2024-09-24T13:35:30.673Z","updated_at":"2025-09-10T05:14:03.816Z","avatar_url":"https://github.com/ugglr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-value-picker\n![weekly-downloads-badge](https://img.shields.io/npm/dw/react-native-value-picker)\n![monthly-downloads-badge](https://img.shields.io/npm/dm/react-native-value-picker)\n![yearly-downloads-badge](https://img.shields.io/npm/dy/react-native-value-picker)\n![total-downloads-badge](https://img.shields.io/npm/dt/react-native-value-picker)\n![version-badge](https://img.shields.io/npm/v/react-native-value-picker)\n\nCross-Platform iOS style picker for react native.\n\nSmall, Performant\n\nThe Native picker on Android is a modal / dropdown design which is vastly different from the native iOS picker. In my current project we wanted a design more similar to the iOS native picker, and thus I created this Scroll Picker as a replacement on Android, but it works equally well on iOS for instance as an alternative to [@react-native-community/picker](https://github.com/react-native-community/react-native-picker) native iOS picker module.\n\n### Examples\n\n| Basic Example                                | Bottom Sheet Example                                       |\n| -------------------------------------------- | ---------------------------------------------------------- |\n| ![basic example](./assets/basic_example.gif) | ![Bottom Sheet Example](./assets/bottom_sheet_example.gif) |\n\n### Install into project\n\n```\nyarn add react-native-value-picker\n```\n\n**import and usage**\n\n```\nimport {ScrollPicker} from 'react-native-value-picker';\n\n        ...\n\n        \u003cScrollPicker\n          // We need to tell the picker the current picked value\n          currentValue={pickedValue}\n          // The picker is a pure component so we need to tell it\n          // what data it needs to subscribe to, otherwise it won't\n          // re-render\n          extraData={pickedValue}\n          // The array of objects which makes up the list\n          list={MOCK_DATA}\n          // Callback function to update the picked value\n          onItemPress={setPickedValue}\n          // Changes the text color in the list\n          labelColor=\"blue\"\n          // Changes color of the row separator in the list\n          separatorColor=\"purple\"\n          // Changes color of the text of the picked item in the list\n          selectedColor=\"red\"\n        /\u003e\n\n        ...\n```\n\n**Picker List Data Structure**\n\nthe list prop requires an array of Objects according to the below structure.\n\n- value: the API value\n- label: the text rendered into the picker list.\n\n```\nexport const MOCK_DATA = [\n  {\n    value: 1,\n    label: 'Number 1',\n  },\n  {\n    value: 2,\n    label: 'Number 2',\n  },\n  {\n    value: 15,\n    label: 'Number 15',\n  },\n  {\n    value: 16,\n    label: 'Number 16',\n  },\n];\n```\n\n### Run the examples Locally\n\nClone project\n\n```\ngit clone https://github.com/ugglr/react-native-value-picker.git\n```\n\nmove into the examples folder.\n\n```\ncd react-native-value-picker \u0026\u0026 cd examples\n```\n\nin examples root\n\n```\nyarn\n```\n\n**iOS**\nInstall pods and go back to examples root\n\n```\ncd ios \u0026\u0026 pod install \u0026\u0026 cd ..\n```\n\nRun react native\n\n```\nyarn run ios\n```\n\n**Android**\nrun react native in examples root\n\n```\nyarn run android\n```\n\n### ScrollPicker Props\n\n| Prop             | Description                                                                                                                                                                                                                                                   |\n| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `currentValue`   | Tells the picker the current picked value                                                                                                                                                                                                                     |\n| `extraData`      | The underlying RN component which creates the list is FlatList. Which means, as a FlatList it is a pure component and won't re-render, unless it subscribes to a piece of data that will trigger a re-render.                                                 |\n| `list`           | The array of objects which makes up the list. Each Object in the Array needs to have a value-field, and a label-field. Value is the API value which the developer needs to user to pick. Label is the verbose friendly String which is displayed to the user. |\n| `onItemPress`    | Callback which get's executed when user presses an Item in the picker list.                                                                                                                                                                                   |\n| `labelColor`     | Changes the un-picked text color of the Items in the list                                                                                                                                                                                                     |\n| `separatorColor` | Changes color of the separator lines between the Items in the list.                                                                                                                                                                                           |\n| `selectedColor`  | Changes the picked Item text color                                                                                                                                                                                                                            |\n\n### Example Code\n\n**BasicExample.js**\n\n```\nimport React, {useState} from 'react';\nimport {View, Text, StyleSheet} from 'react-native';\n\nimport {ScrollPicker} from 'react-native-value-picker';\n\nimport {MOCK_DATA} from './mockData';\n\nfunction BasicExample() {\n  const [pickedValue, setPickedValue] = useState(7);\n\n  return (\n    \u003cView style={styles.Container}\u003e\n      \u003cText style={styles.Title}\u003eBasic Example\u003c/Text\u003e\n      \u003cText\u003eCurrent Value Picked: {pickedValue}\u003c/Text\u003e\n\n      \u003cView style={styles.PickerContainer}\u003e\n        \u003cScrollPicker\n          currentValue={pickedValue}\n          extraData={pickedValue}\n          list={MOCK_DATA}\n          onItemPress={setPickedValue}\n        /\u003e\n      \u003c/View\u003e\n      \u003cText style={{fontSize: 22, textAlign: 'center'}}\u003e\n        We can customize the look by setting the labelColor, separatorColor and\n        selectedColor props\n      \u003c/Text\u003e\n      \u003cView style={styles.PickerContainer}\u003e\n        \u003cScrollPicker\n          // We need to tell the picker the current picked value\n          currentValue={pickedValue}\n          // The picker is a pure component so we need to tell it\n          // what data it needs to subscribe to, otherwise it won't\n          // re-render\n          extraData={pickedValue}\n          // The array of objects which makes up the list\n          list={MOCK_DATA}\n          // Callback function to update the picked value\n          onItemPress={setPickedValue}\n          // Changes the text color in the list\n          labelColor=\"blue\"\n          // Changes color of the row separator in the list\n          separatorColor=\"purple\"\n          // Changes color of the text of the picked item in the list\n          selectedColor=\"red\"\n        /\u003e\n      \u003c/View\u003e\n    \u003c/View\u003e\n  );\n}\n\nconst styles = StyleSheet.create({\n... see example file for styles ...\n});\n\nexport default BasicExample;\n\n```\n\n**Bottom Sheet Example**\n\n\u003e Note:\n\u003e The bottom sheet component is not included in the package. I'm using [react-native-raw-bottom-sheet](https://github.com/nysamnang/react-native-raw-bottom-sheet)\n\n```\nimport React, {useRef, useState} from 'react';\nimport {View, Text, Button, StyleSheet} from 'react-native';\nimport RBSheet from 'react-native-raw-bottom-sheet';\n\nimport {ScrollPicker} from 'react-native-value-picker';\n\nimport {MOCK_DATA} from './mockData';\n\nfunction BottomSheetExample() {\n  const [pickedValue, setPickedValue] = useState(7);\n  const refRBSheet = useRef();\n\n  return (\n    \u003cView style={styles.Container}\u003e\n\n    ...\n\n      \u003cRBSheet\n        ref={refRBSheet}\n        closeOnDragDown={true}\n        closeOnPressMask={true}\n        height={300}\n        customStyles={{\n          draggableIcon: {\n            backgroundColor: '#000',\n          },\n          container: {\n            borderRadius: 12,\n          },\n        }}\u003e\n        {/* Start of Scroll Picker */}\n        {/*\n            The underlying FlatList is not wrapped with a View.\n            So to align it in the sheet I wrap the picker and control\n            the positioning. I like that approach because devs has full control\n            over how the picker is placed \u0026 aligned.\n        */}\n        \u003cView style={styles.SheetView}\u003e\n          \u003cScrollPicker\n            // We need to tell the picker the current picked value\n            currentValue={pickedValue}\n            // The picker is a pure component so we need to tell it\n            // what data it needs to subscribe to, otherwise it won't\n            // re-render\n            extraData={pickedValue}\n            // The array of objects which makes up the list\n            list={MOCK_DATA}\n            // Callback function to update the picked value\n            onItemPress={setPickedValue}\n          /\u003e\n        \u003c/View\u003e\n        {/* End of Scroll Picker */}\n      \u003c/RBSheet\u003e\n    \u003c/View\u003e\n  );\n}\n\nconst styles = StyleSheet.create({\n... see the example file for styles ...\n});\n\nexport default BottomSheetExample;\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fugglr%2Freact-native-value-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fugglr%2Freact-native-value-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fugglr%2Freact-native-value-picker/lists"}