{"id":4153,"url":"https://github.com/xgfe/react-native-label-select","last_synced_at":"2025-05-05T15:10:25.775Z","repository":{"id":57145857,"uuid":"78625299","full_name":"xgfe/react-native-label-select","owner":"xgfe","description":"A react native component used for making multiple choices.","archived":false,"fork":false,"pushed_at":"2020-04-28T06:44:35.000Z","size":1803,"stargazers_count":130,"open_issues_count":10,"forks_count":21,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-05-05T15:10:14.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/xgfe.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}},"created_at":"2017-01-11T09:51:10.000Z","updated_at":"2024-09-10T21:03:26.000Z","dependencies_parsed_at":"2022-09-05T22:30:56.914Z","dependency_job_id":null,"html_url":"https://github.com/xgfe/react-native-label-select","commit_stats":null,"previous_names":["tinysymphony/react-native-label-select"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgfe%2Freact-native-label-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgfe%2Freact-native-label-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgfe%2Freact-native-label-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xgfe%2Freact-native-label-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xgfe","download_url":"https://codeload.github.com/xgfe/react-native-label-select/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252522172,"owners_count":21761685,"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":[],"created_at":"2024-01-05T20:17:02.747Z","updated_at":"2025-05-05T15:10:25.757Z","avatar_url":"https://github.com/xgfe.png","language":"JavaScript","funding_links":[],"categories":["Components"],"sub_categories":["UI"],"readme":"## react-native-label-select [![Build Status](https://travis-ci.org/xgfe/react-native-label-select.svg?branch=master)](https://travis-ci.org/xgfe/react-native-label-select) [![Coverage Status](https://coveralls.io/repos/github/Tinysymphony/react-native-label-select/badge.svg?branch=master)](https://coveralls.io/github/Tinysymphony/react-native-label-select?branch=master)\nLabelSelect is a component used for making multiple choices. The modal is a checkbox like html.\n\n## Example\n\u003ca href=\"#android\" id=\"android\"\u003e\u003cimg src=\"./GIF/android.gif\" align=\"left\" width=\"240\"/\u003e\u003c/a\u003e\n\n\u003ca href=\"#ios\" id=\"ios\"\u003e\u003cimg src=\"./GIF/ios.gif\" width=\"240\"/\u003e\u003c/a\u003e\n\n## Usage\n\n```shell\nnpm install --save react-native-label-select\n```\n\n```js\nimport LabelSelect from 'react-native-label-select';\n```\n\n```html\n\u003cLabelSelect\n  ref=\"labelSelect\"\n  title=\"Make Choices\"\n  enable={true}\n  readOnly={false}\n  enableAddBtn={true}\n  style={yourStyle}\n  onConfirm={(list) =\u003e {...}}\u003e\n\n  \u003cLabelSelect.Label\n    key={...}\n    data={itemA}\n    onCancel={func}\u003eselected ItemA\u003c/LabelSelect.Label\u003e\n  \u003cLabelSelect.ModalItem\n    key={...}\n    data={itemB}\u003eItem B\u003c/LabelSelect.ModalItem\u003e\n\u003c/LabelSelect\u003e\n\n```\n\n## Properties\n\n**LabelSelect**\n\n| Prop | Default | Type | Description |\n| --- | --- | --- | --- |\n| style | - | object | Specify styles for the LabelSelect |\n| title | - | string | The title text of the modal |\n| readOnly | false | bool | is the component readonly |\n| enable | true | bool | is the component interactive  |\n| enableAddBtn | true | bool | whether to show the add button |\n| onConfirm | - | function | Triggered when the confirm button of modal is pressed with the newly selected items list passed as the only argument |\n| confirmText | - | string | Text of confirm button. |\n| cancelText | - | string | Text of cancelText button. |\n| customStyle | - | object | You can customize styles of `modal` / `buttonView` / `confirmButton` / `confirmText` / `cancelButton` / `cancelText` by `customStyle. |\n\n**LabelSelect.Label**\n\n\n| Prop | Default | Type | Description |\n| --- | --- | --- | --- |\n| onCancel | - | function | Triggered when the close button of Label is pressed. |\n| data | - | any | Data that bind to the Label |\n| customStyle | - | object | You can customize styles of `text` by `customStyle. |\n\n**LabelSelect.ModalItem**\n\n\n\n\n| Prop | Default | Type | Description |\n| --- | --- | --- | --- |\n| data | - | any | Data that bind to the ModalItem. After confirming the items selected on modal, the data will be passed to the selected list. |\n\n\n## Instance Methods\n\n\n| Method | Params | Description |\n| --- | --- | --- |\n| openModal | - | Open select modal |\n| cancelSelect | - | Close select modal. Also triggered when the cancel button of modal being pressed. |\n| customStyle | - | object | You can customize styles of `modalText` / `outerCircle` / `innerCircle` by `customStyle. |\n\nUse `ref` property as a hook to invoke internal methods.\n\n```html\n\u003cLabelSelect ref=\"select\"\u003e...\u003c/LabelSelect\u003e\n```\n\n```js\nthis.ref.select.openModal()\nthis.ref.select.cancelSelect()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxgfe%2Freact-native-label-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxgfe%2Freact-native-label-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxgfe%2Freact-native-label-select/lists"}