{"id":18782874,"url":"https://github.com/rescript-react-native/picker","last_synced_at":"2025-04-13T12:11:50.509Z","repository":{"id":40724701,"uuid":"252338975","full_name":"rescript-react-native/picker","owner":"rescript-react-native","description":"ReScript bindings for @react-native-community/picker","archived":false,"fork":false,"pushed_at":"2023-08-02T08:39:35.000Z","size":266,"stargazers_count":2,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T03:12:15.139Z","etag":null,"topics":["picker","react","react-native","rescript","rescript-react","rescript-react-native"],"latest_commit_sha":null,"homepage":"","language":"ReScript","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/rescript-react-native.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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},"funding":{"github":["MoOx"]}},"created_at":"2020-04-02T02:46:07.000Z","updated_at":"2024-02-19T01:13:56.000Z","dependencies_parsed_at":"2024-11-07T20:39:46.764Z","dependency_job_id":"a96390c9-d0a1-4867-8396-9c1e230cdbbb","html_url":"https://github.com/rescript-react-native/picker","commit_stats":{"total_commits":21,"total_committers":3,"mean_commits":7.0,"dds":0.09523809523809523,"last_synced_commit":"57582ee9bb1c36976e6c33040d4a8385fab82df2"},"previous_names":["reason-react-native/picker"],"tags_count":3,"template":false,"template_full_name":"rescript-react-native/__template__","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Fpicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Fpicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Fpicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rescript-react-native%2Fpicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rescript-react-native","download_url":"https://codeload.github.com/rescript-react-native/picker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248329861,"owners_count":21085614,"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","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":["picker","react","react-native","rescript","rescript-react","rescript-react-native"],"created_at":"2024-11-07T20:37:21.368Z","updated_at":"2025-04-13T12:11:50.488Z","avatar_url":"https://github.com/rescript-react-native.png","language":"ReScript","funding_links":["https://github.com/sponsors/MoOx"],"categories":[],"sub_categories":[],"readme":"# `@rescript-react-native/picker`\n\n[![Build Status](https://github.com/rescript-react-native/picker/workflows/Build/badge.svg)](https://github.com/rescript-react-native/picker/actions)\n[![Version](https://img.shields.io/npm/v/@rescript-react-native/picker.svg)](https://www.npmjs.com/@rescript-react-native/picker)\n[![ReScript Forum](https://img.shields.io/discourse/posts?color=e6484f\u0026label=ReScript%20Forum\u0026server=https%3A%2F%2Fforum.rescript-lang.org)](https://forum.rescript-lang.org/)\n\n[ReScript](https://rescript-lang.org) bindings for\n[`@react-native-picker/picker`](https://github.com/react-native-picker/picker).\n\nExposed as `ReactNativePicker` module.\n\n`@rescript-react-native/picker` X.y.\\* means it's compatible with\n`@react-native-picker/picker` X.y.\\*\n\n## Installation\n\nWhen\n[`@react-native-picker/picker`](https://github.com/react-native-picker/picker)\nis properly installed \u0026 configured by following their installation instructions,\nyou can install the bindings:\n\n```console\nnpm install @rescript-react-native/picker\n# or\nyarn add @rescript-react-native/picker\n```\n\n`@rescript-react-native/picker` should be added to `bs-dependencies` in your\n`bsconfig.json`:\n\n```diff\n{\n  //...\n  \"bs-dependencies\": [\n    \"@rescript/react\",\n    \"rescript-react-native\",\n    // ...\n+    \"@rescript-react-native/picker\"\n  ],\n  //...\n}\n```\n\n## Components\n\n### `ReactNativePicker` Component\n\nSupported on _Android_ and _iOS_.\n\n#### Props\n\n| Prop Name and Type                                                                        | Notes                                                                                                                                                                                                                   |\n| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `onValueChange:` \u003cbr /\u003e `('a, int) =\u003e unit`                                               | Callback for when an item is selected. Takes as arguements item value of any type (`'a`) and index of the selected item as `int`.                                                                                       |\n| `selectedValue: 'a`                                                                       | Value should be that of one of the items.                                                                                                                                                                               |\n| `enabled: bool`                                                                           | _Android only_ \u003cbr /\u003e Making a selection will be disabled when set to `false`.                                                                                                                                          |\n| `mode`: \u003cbr /\u003e \\[\u0026nbsp;\u0026#124;\u0026nbsp;`` `dialog ``\u0026nbsp;\u0026#124;\u0026nbsp;`` `dropdown ``\u0026nbsp;\\] | _Android only_ \u003cbr /\u003e Specifies how selection items will be displayed the picker is tapped. \u003cbr /\u003e \u003cbr /\u003e - `` `dialog ``: modal dialog (**default**) \u003cbr /\u003e - `` `dropdown ``: dropdown anchored to the `Picker` view. |\n| `prompt: string`                                                                          | _Android only_ \u003cbr /\u003e Title of the modal dialog when `mode` is set to `` `dialog ``.                                                                                                                                    |\n| `itemStyle: ReactNative.Style.t`                                                          | _iOS only_ \u003cbr /\u003e Style to be applied to each item label. \u003cbr /\u003e \u003cbr /\u003e **Note:** only `Text` style props are supported.                                                                                                |\n\nPlease also see\n[ReScript React Native documentation of `View` props](https://rescript-react-native.github.io/en/docs/components/View/)\nfor additional supported props.\n\n### `ReactNativePickerIOS` Component\n\nSupported on _iOS_.\n\n#### Props\n\n| Prop Name and Type                          | Notes                                                                                                                             |\n| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |\n| `onValueChange:` \u003cbr /\u003e `('a, int) =\u003e unit` | Callback for when an item is selected. Takes as arguements item value of any type (`'a`) and index of the selected item as `int`. |\n| `selectedValue: 'a`                         | Value should be that of one of the items.                                                                                         |\n| `itemStyle: ReactNative.Style.t`            | Style to be applied to each item label. \u003cbr /\u003e \u003cbr /\u003e **Note:** only `Text` style props are supported.                            |\n\nPlease also see\n[ReScript React Native documentation of `View` props](https://rescript-react-native.github.io/en/docs/components/View/)\nfor additional supported props.\n\n### `ReactNativePicker.Item` and `ReactNativePickerIOS.Item` Components\n\n#### Props\n\n| Prop Name and Type           | Notes                                  |\n| ---------------------------- | -------------------------------------- |\n| `value: 'a`                  | Value of the item.                     |\n| `label: string`              | Label for the item in the `Picker`.    |\n| `color: ReactNative.Color.t` | Color of the item label.               |\n| `testID: string`             | ID string to locate the item in tests. |\n\n---\n\n## Changelog\n\nCheck the [changelog](./CHANGELOG.md) for more informations about recent\nreleases.\n\n---\n\n## Contribute\n\nRead the\n[contribution guidelines](https://github.com/rescript-react-native/.github/blob/master/CONTRIBUTING.md)\nbefore contributing.\n\n## Code of Conduct\n\nWe want this community to be friendly and respectful to each other. Please read\n[our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md)\nso that you can understand what actions will and will not be tolerated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frescript-react-native%2Fpicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frescript-react-native%2Fpicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frescript-react-native%2Fpicker/lists"}