{"id":23843395,"url":"https://github.com/interfacekit/react-native-image-picker-form","last_synced_at":"2025-09-07T18:32:47.871Z","repository":{"id":29325702,"uuid":"120755674","full_name":"InterfaceKit/react-native-image-picker-form","owner":"InterfaceKit","description":"A React Native image picker for tcomb-form-native","archived":false,"fork":false,"pushed_at":"2022-12-08T19:12:56.000Z","size":20379,"stargazers_count":22,"open_issues_count":18,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-30T21:22:39.096Z","etag":null,"topics":["form","image-picker","react","react-native","tcomb-form-native"],"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/InterfaceKit.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":"2018-02-08T11:58:22.000Z","updated_at":"2024-07-15T10:49:44.000Z","dependencies_parsed_at":"2023-01-14T14:45:29.820Z","dependency_job_id":null,"html_url":"https://github.com/InterfaceKit/react-native-image-picker-form","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterfaceKit%2Freact-native-image-picker-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterfaceKit%2Freact-native-image-picker-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterfaceKit%2Freact-native-image-picker-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterfaceKit%2Freact-native-image-picker-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InterfaceKit","download_url":"https://codeload.github.com/InterfaceKit/react-native-image-picker-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232245498,"owners_count":18494223,"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":["form","image-picker","react","react-native","tcomb-form-native"],"created_at":"2025-01-02T19:28:28.445Z","updated_at":"2025-01-02T19:28:29.360Z","avatar_url":"https://github.com/InterfaceKit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-image-picker-form\n\n\u003cp\u003e\n\u003cimg src=\"https://img.shields.io/npm/dm/react-native-image-picker-form.svg\" /\u003e\n\u003cimg src=\"https://img.shields.io/npm/dt/react-native-image-picker-form.svg\" /\u003e\n\u003c/p\u003e\n\nA React Native component factory to use with [`tcomb-form-native`](https://github.com/gcanti/tcomb-form-native) library. Currently using [`react-native-image-crop-picker`](https://github.com/ivpusic/react-native-image-crop-picker) to provide image selection.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/wiki/InterfaceKit/react-native-image-picker-form/images/ios.gif\" alt=\"Image factory\" width=\"442\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/wiki/InterfaceKit/react-native-image-picker-form/images/android.gif\" alt=\"Image factory\"\u003e\n\u003c/p\u003e\n\n## Getting started\n\n```sh\n$ yarn add react-native-image-picker-form\n```\n\nAfter that, follow the instructions on: https://github.com/ivpusic/react-native-image-crop-picker#install\n\n## Usage\n\nWhen configuring your `tcomb-form-native` form, use the `factory` option to set as `SelectImageFactory`.\nYou can change the text displayed on ActionSheet or BottomSheet setting a options value or change the title with title option on `config`.\n\nDefault locale is `en-US`:\n\n```js\nimport React from 'react-native'\nimport t from 'tcomb-form-native'\nimport ImageFactory from 'react-native-image-picker-form'\n\nconst Form = t.form.Form\nconst DocumentFormStruct = t.struct({\n  image: t.String\n})\n\ntype Props = {}\ntype State = {\n  value: Object,\n  options: Object\n}\n\nclass App extends React.Component\u003cProps, State\u003e {\n  constructor(props) {\n    super(props)\n    this.state = {\n      value: {},\n      options: {\n        fields: {\n          image: {\n            config: {\n              title: 'Select image',\n              options: ['Open camera', 'Select from gallery', 'Cancel']\n              // Used on Android to style BottomSheet\n              style: {\n                titleFontFamily: 'Roboto'\n              }\n            },\n            error: 'No image provided',\n            factory: ImageFactory\n          }\n        }\n      }\n    }\n  }\n\n  render() {\n    return (\n      \u003cForm\n        ref={(ref: any) =\u003e {\n          this.form = ref\n        }}\n        type={DocumentFormStruct}\n        value={this.state.value}\n        options={this.state.options}\n      /\u003e\n    )\n  }\n}\n```\n\n## License\n\nMIT License\n\nCopyright (c) 2018 InterfaceKit\n\n## Author\n\nAntonio Moreno Valls `\u003camoreno at apsl.net\u003e`\n\nBuilt with 💛 by [APSL](https://github.com/apsl).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterfacekit%2Freact-native-image-picker-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterfacekit%2Freact-native-image-picker-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterfacekit%2Freact-native-image-picker-form/lists"}