React Native document picker & viewer
# React Native document picker & viewer > Document picker and viewer for React Native and Expo apps (Android, iOS). Packages: @react-native-documents/picker, @react-native-documents/viewer ## Overview `@react-native-documents/picker` lets users pick, import, or save documents from the device's file system. `@react-native-documents/viewer` previews documents using native viewers (QuickLook on iOS, Intent.ACTION_VIEW on Android). Key features: - **Import mode**: pick a file and keep your ow…
Unclaimed Agent
Are you the maintainer? Claim this agent to manage its listing and increase its trust score.
# React Native document picker & viewer > Document picker and viewer for React Native and Expo apps (Android, iOS). Packages: @react-native-documents/picker, @react-native-documents/viewer ## Overview `@react-native-documents/picker` lets users pick, import, or save documents from the device's file system. `@react-native-documents/viewer` previews documents using native viewers (QuickLook on iOS, Intent.ACTION_VIEW on Android). Key features: - **Import mode**: pick a file and keep your own copy - **Open mode**: access the selected document directly, with optional long-term permissions - **Save As dialog**: let users save files to a location of their choice - **Directory picker**: pick a directory for file I/O operations - **Document viewer**: preview files by uri or bookmark ## Quick start 1. Install the package (see Installation & Setup) 2. Use `pick()` to let users select documents 3. Optionally use `keepLocalCopy()` to save files to your app's storage 4. Use `viewDocument()` from the viewer package to preview files ## Docs ## Table of Contents - [Installation](https://react-native-documents.github.io/docs/install): Installation and setup guide for @react-native-documents/picker and @react-native-documents/viewer with Expo and bare React Native - [Introduction](https://react-native-documents.github.io/docs/sponsor-only/intro): Introduction to @react-native-documents/picker and @react-native-documents/viewer packages for picking, saving, and viewing documents in React Native - [Import mode](https://react-native-documents.github.io/docs/sponsor-only/picker/import-mode): Import mode allows you to pick a file from the user's device and keep your own copy of it - [Open mode](https://react-native-documents.github.io/docs/sponsor-only/picker/open-mode): Open mode allows you to access the selected documents directly. - ['Save As' dialog](https://react-native-documents.github.io/docs/sponsor-only/picker/save-as-dialog): Present a Save As dialog using saveDocuments to let users save files to a location of their choice - [Keeping a local copy of the picked files {#keepLocalCopy}](https://react-native-documents.github.io/docs/sponsor-only/picker/keeping-local-copy): Use keepLocalCopy to save picked files to your app's storage on Android and iOS - [Limiting selectable file types](https://react-native-documents.github.io/docs/sponsor-only/picker/limiting-selectable-files): Limit selectable file types in the document picker - [Directory picker](https://react-native-documents.github.io/docs/sponsor-only/picker/directory-picker): Pick a directory from the file system with optional long-term access for persistent file I/O - [Virtual files](https://react-native-documents.github.io/docs/sponsor-only/picker/virtual-files): Handle Android virtual files (Google Docs, Sheets) in the document picker with allowVirtualFiles - [Android usage notes](https://react-native-documents.github.io/docs/sponsor-only/picker/integrating-on-android): Android-specific usage notes comparing Open and Import modes with screenshots - [Document Viewer](https://react-native-documents.github.io/docs/sponsor-only/viewer): Document viewer for previewing files by uri or bookmark on Android (Intent.ACTION_VIEW) and iOS (QuickLook) - [Error handling](https://react-native-documents.github.io/docs/sponsor-only/errors): Error handling guide covering error codes, isErrorWithCode helper, and best practices for document picker and viewer - [Jest module mocks](https://react-native-documents.github.io/docs/sponsor-only/jest-mocks): Jest module mocks for testing with @react-native-documents/picker and @react-native-documents/viewer - [Migrating from the old document-picker](https://react-native-documents.github.io/docs/sponsor-only/migration): Migration guide from react-native-document-picker to @react-native-documents/picker with step-by-step instructions - [document-picker API](https://react-native-documents.github.io/docs/doc-picker-api): > **BookmarkingResponse** = \{ `bookmark`: `string`; `bookmarkStatus`: `"success"`; \} \| \{ `bookmarkError`: `string`; `bookmarkStatus`: `"error"`... - [document-viewer API](https://react-native-documents.github.io/docs/doc-viewer-api): > **BaseOptions** = \{ `androidApplicationId?`: `string`; `grantPermissions?`: `"read"` \| `"write"`; `headerTitle?`: `string`; `mimeType?`: `strin...