{"id":4361,"url":"https://github.com/akshit5230/rn-action-picker","last_synced_at":"2026-04-25T18:32:18.226Z","repository":{"id":143906585,"uuid":"186623732","full_name":"akshit5230/rn-action-picker","owner":"akshit5230","description":"A simple action sheet style picker for iOS and Android. Native action sheet in iOS.","archived":false,"fork":false,"pushed_at":"2019-06-03T12:25:25.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-26T11:46:55.545Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akshit5230.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-05-14T13:04:17.000Z","updated_at":"2023-03-09T05:52:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"145b4d01-6d46-4ef1-82c5-090dd02c3d55","html_url":"https://github.com/akshit5230/rn-action-picker","commit_stats":null,"previous_names":["akshit5230/rn-action-sheet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akshit5230/rn-action-picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshit5230%2Frn-action-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshit5230%2Frn-action-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshit5230%2Frn-action-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshit5230%2Frn-action-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akshit5230","download_url":"https://codeload.github.com/akshit5230/rn-action-picker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshit5230%2Frn-action-picker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32273213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-01-05T20:17:09.505Z","updated_at":"2026-04-25T18:32:18.200Z","avatar_url":"https://github.com/akshit5230.png","language":"JavaScript","funding_links":[],"categories":["Components"],"sub_categories":["UI"],"readme":"# React Native Action Picker\nA simple action picker for iOS and Android. Renders Native ActionSheetIOS Component in iOS and custom ActionSheet lookalike component in Android.\n\n## Installation\n`npm i --save rn-action-picker`\n\n## Usage\n\n1. Minimal example\n```\n\u003cActionPicker \n  options={{\n    options: ['Cancel', 'Camera', 'Gallery'],\n    destructiveButtonIndex: 1,\n    title: \"Choose photo from?\",\n    message: \"Please select where you want the photo to be picked from\",\n    tintColor: \"#000000\"\n  }}\n  onPressAction={(buttonIndex) =\u003e {\n    if (buttonIndex === 1) {\n      // Do something if you tap on 'Camera'\n    } else if (buttonIndex === 2) {\n      // Do something if you tap on 'Gallery'\n    }\n   }\n/\u003e\n```\n\n2. Full Example \n```\nimport React from 'react';\nimport {\n  View, Button\n} from 'react-native;\nimport ActionPicker from 'rn-action-sheet';\n\nconst options = {\n  options: ['Cancel', 'Camera', 'Gallery'],\n  destructiveButtonIndex: 1,\n  title: \"Choose photo from?\",\n  message: \"Please select where you want the photo to be picked from\",\n  tintColor: \"#000000\"\n}\n\nexport default class MyExample extends React.Component {\n  \n  render() {\n    return(\n      \u003cView style={styles.container}\u003e\n        \u003cButton title=\"Upload Photo\" onPress={() =\u003e this.actionSheetRef.show()} /\u003e\n        \u003cActionPicker\n          ref={(ref) =\u003e this.actionSheetRef = ref}\n          options={options}\n          onPressAction={this.onPressAction}\n        /\u003e\n      \u003c/View\u003e\n    )\n  }\n  \n  onPressAction = (buttonIndex) =\u003e {\n    if (buttonIndex === 1) {\n      // Do something if you tap on 'Camera'\n    } else if (buttonIndex === 2) {\n      // Do something if you tap on 'Gallery'\n    }\n  }\n  \n}\n\nconst styles = {\n  container: {\n    justifyContent: 'center',\n    alignItems: 'center'\n  }\n}\n```\n\n## Props\n| Name | Description | Type |\n| --- | --- | --- |\n| options | Takes an object which has all the properties for the action sheet such as options array | Object |\n| onPressAction | Callback function to trigger press on an option. Returns the index of the option pressed. | Function |\n\n### Options \n| Name | Description | Type | Example | \n| --- | --- | --- | --- |\n| options | An array of options to show in the action sheet. Note that the first option (at index 0) will always be the cancel button. | Array of Strings | ['Cancel', 'Camera', 'Gallery'] |\n| destructiveButtonIndex | If you want to show a button in red color, pass the index of that option to this. | Integer | 2 |\n| title | Provide a title to the action sheet. Renders on top. | String | \"Choose an option\" |\n| message | Provide a descriptive message below the title. | String | \"Please choose one of the following options\" |\n| tintColor | Color for the options text | String | \"#000000\" |\n\nNote that `cancelButtonIndex` is default to 0 always. So you must put that option at 0th index in the `options` array.\n\n### Functions\n| Name | Description | Example | \n| --- | --- | --- |\n| show() | Create a reference of the ActionSheet component and call this function to present it. | `this._actionSheetRef.show()` |\n\nHope it helps!\n\n      \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshit5230%2Frn-action-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakshit5230%2Frn-action-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshit5230%2Frn-action-picker/lists"}