expo-media-picker
v0.1.2
Published
React Native Expo Media Picker (Files, Gallery & Camera)
Downloads
5
Maintainers
Readme
expo-media-picker
A complete media file selector for React Native Expo.
Functionality: Select Gallery / Files / Camera
Installation
# yarn
yarn add expo-media-picker
# npm
npm install expo-media-picker --save
Then, import with:
import MediaPicker from "expo-media-picker";
Note:
You may also need to install @expo/vector-icons
.
Note: Currently facing a bug, if your import is not working try:
import MediaPicker from "expo-media-picker/dist";
Usage
Example:
import React, { useState } from "react";
import { StyleSheet, Text, View, Button } from "react-native";
import MediaPicker from "expo-media-picker";
export default function App() {
const [visible, setVisible] = useState(false);
return (
<View>
<MediaPicker value={null} onChange={(e) => null} title="Select a file" />
</View>
);
}
You can see a full example app inside the /example folder!