{"id":18348731,"url":"https://github.com/paraboly/react-native-media-picker","last_synced_at":"2025-04-06T09:31:48.184Z","repository":{"id":46805176,"uuid":"232543482","full_name":"Paraboly/react-native-media-picker","owner":"Paraboly","description":"Easy to use media picker modal for React Native by Paraboly","archived":false,"fork":false,"pushed_at":"2023-05-07T17:06:02.000Z","size":15583,"stargazers_count":11,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-21T21:11:56.571Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https:/paraboly.com","language":"TypeScript","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/Paraboly.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}},"created_at":"2020-01-08T11:00:24.000Z","updated_at":"2021-12-08T15:41:25.000Z","dependencies_parsed_at":"2022-07-22T20:47:23.227Z","dependency_job_id":null,"html_url":"https://github.com/Paraboly/react-native-media-picker","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"WrathChaos/react-native-typescript-library-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Freact-native-media-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Freact-native-media-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Freact-native-media-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Freact-native-media-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paraboly","download_url":"https://codeload.github.com/Paraboly/react-native-media-picker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247463744,"owners_count":20942935,"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-11-05T21:18:59.072Z","updated_at":"2025-04-06T09:31:46.257Z","avatar_url":"https://github.com/Paraboly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"React Native Media Picker by Paraboly\" src=\"assets/logo.png\" width=\"1050\"/\u003e\n\n[![Battle Tested ✅](https://img.shields.io/badge/-Battle--Tested%20%E2%9C%85-03666e?style=for-the-badge)](https://github.com/Paraboly/react-native-media-picker)\n\n[![Easy to use media picker modal for React Native by Paraboly](https://img.shields.io/badge/-Easy%20to%20use%20media%20picker%20modal%20for%20React%20Native%20by%20Paraboly-lightgrey?style=for-the-badge)](https://github.com/Paraboly/react-native-media-picker)\n\n[![npm version](https://img.shields.io/npm/v/@paraboly/react-native-media-picker.svg?style=for-the-badge)](https://www.npmjs.com/package/@paraboly/react-native-media-picker)\n[![npm](https://img.shields.io/npm/dt/@paraboly/react-native-media-picker.svg?style=for-the-badge)](https://www.npmjs.com/package/@paraboly/react-native-media-picker)\n![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS-blue.svg?style=for-the-badge)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=for-the-badge)](https://github.com/prettier/prettier)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"React Native Media Picker by Paraboly\"\n        src=\"assets/Screenshots/example.png\" /\u003e\n  \u003cimg alt=\"React Native Media Picker by Paraboly\"\n        src=\"assets/Screenshots/example.gif\" /\u003e\n\u003c/p\u003e\n\n# Installation\n\nAdd the dependency:\n\n```ruby\nnpm i @paraboly/react-native-media-picker\n```\n\n## Peer Dependencies\n\n###### IMPORTANT! You need install them\n\n```js\n\"@freakycoder/react-native-helpers\": \"\u003e= 0.1.2\",\n\"react-native-image-crop-picker\": \"\u003e= 0.26.2\",\n\"react-native-modalize\": \"\u003e= 2.0.0\",\n\"react-native-vector-icons\": \"\u003e= 6.6.0\",\n\"react-native-dynamic-vector-icons\": \"\u003e= 0.2.1\",\n```\n\n## iOS \u0026 Android Permissions\n\n### iOS\n\n```plist\n\u003ckey\u003eNSCameraUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis allows us to capture and use the the captured photo\u003c/string\u003e\n\u003ckey\u003eNSPhotoLibraryAddUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis allows us to show/pick a photo from your library\u003c/string\u003e\n\u003ckey\u003eNSPhotoLibraryUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis allows us to show/pick a photo from your library\u003c/string\u003e\n```\n\n### Android\n\n```xml\n\u003cuses-permission android:name=\"android.permission.CAMERA\" /\u003e\n\u003cuses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" /\u003e\n```\n\n# Usage\n\n## Import\n\n```js\nimport MediaPicker from \"@paraboly/react-native-media-picker\";\n```\n\n## Basic Usage\n\n```jsx\n\u003cMediaPicker\u003e\n```\n\n## Advanced Usage\n\nYou can check the example :) Put your own logic for galleryOnPress or cameraOnPress both returns the callback of the images.\n\n```jsx\n\u003cMediaPicker\n  multiple\n  ref={(ref) =\u003e (this.mediaPicker = ref)}\n  cameraOnPress={(image: any) =\u003e {\n    this.setState({ image });\n  }}\n  galleryOnPress={(images: any) =\u003e {\n    this.setState({\n      image: null,\n      images: images.map((image: any) =\u003e {\n        return {\n          uri: image.path,\n          width: image.width,\n          height: image.height,\n          mime: image.mime,\n        };\n      }),\n    });\n    // ? Single Image (Multiple = false)\n    // this.setState({\n    //   image: {\n    //     uri: image.path,\n    //     width: image.width,\n    //     height: image.height,\n    //     mime: image.mime\n    //   }\n    // });\n  }}\n/\u003e\n```\n\n## Open/Close The MediaPicker Modal\n\n#### Open\n\n```js\nthis.mediaPicker.openModal();\n```\n\n#### Close\n\n```js\nthis.mediaPicker.closeModal();\n```\n\n# Configuration - Props\n\n| Property                     |   Type    |   Default   | Description                                                                   |\n| ---------------------------- | :-------: | :---------: | ----------------------------------------------------------------------------- |\n| IconComponent                | component |    Icon     | set your own Icon component such as Icon from react-native-vector-icons       |\n| multiple                     |  boolean  |    true     | change the picking media's as single or multiple at once                      |\n| cameraText                   |  string   |   Camera    | change the camera button's text                                               |\n| galleryText                  |  string   |   Gallery   | change the gallery button's text                                              |\n| backgroundColor              |   color   |   #90a1fc   | change the modal's background color                                           |\n| onCameraPress                | function  |   default   | set your own logic when camera is on pressed **(please check the example)**   |\n| onGalleryPress               | function  |   default   | set your own logic when gallery is on pressed **(please check the example)**  |\n| cameraIconName               |  string   |   camera    | change the camera's icon name                                                 |\n| cameraIconType               |  string   | FontAwesome | change the camera's icon type                                                 |\n| cameraIconColor              |   color   |   #fdfdfd   | change the camera's icon color                                                |\n| cameraIconSize               |  number   |     20      | change the camera's icon size                                                 |\n| galleryIconName              |  string   |  md-photos  | change the gallery's icon name                                                |\n| galleryIconType              |  string   |  Ionicons   | change the gallery's icon type                                                |\n| galleryIconColor             |   color   |   #fdfdfd   | change the gallery's icon color                                               |\n| galleryIconSize              |  number   |     20      | change the gallery's icon size                                                |\n| cameraButtonBackgroundColor  |   color   |   #fdfdfd   | change the camera button's background color                                   |\n| galleryButtonBackgroundColor |   color   |   #fdfdfd   | change the gallery button's background color                                  |\n| cameraButtonSize             |  number   |     50      | change the camera button's whole size                                         |\n| galleryButtonSize            |  number   |     50      | change the gallery button's whole size                                        |\n| cameraTextColor              |   color   |   #fdfdfd   | change the camera button's text color                                         |\n| galleryTextColor             |   color   |   #fdfdfd   | change the gallery button's text color                                        |\n| compressImageQuality         |  number   |     0.5     | change the quality of your photo                                              |\n| onCameraButtonPressed        | function  |   default   | set instead of `react-native-image-crop-picker` library when preesing camera  |\n| onGalleryButtonPressed       | function  |   default   | set instead of `react-native-image-crop-picker` library when preesing gallery |\n\n## Future Plans\n\n- [x] ~~LICENSE~~\n- [ ] Write an article about the lib on Medium\n\n## Author\n\nFreakyCoder, kurayogun@gmail.com\n\n## License\n\nReact Native Media Picker by Paraboly is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparaboly%2Freact-native-media-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparaboly%2Freact-native-media-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparaboly%2Freact-native-media-picker/lists"}