Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. React Native
  3. react-native-file-viewer

react-native-file-viewer

MITJava

A React Native library for previewing any file type supported by the mobile device using native viewers.

GitHubGitHub
447 stars111 forks0 contributors

What is react-native-file-viewer?

react-native-file-viewer is a React Native library that enables developers to open and preview files using the device's native file viewers. It provides a unified API to handle various file types across iOS, Android, and Windows platforms, simplifying file interaction in mobile applications by leveraging native platform capabilities for optimal performance and user experience.

Target Audience

React Native developers building mobile applications that require file preview functionality, such as document viewers, media apps, or any app needing to open user-selected or downloaded files.

Value Proposition

Developers choose this library because it offers a simple, promise-based API that abstracts away platform-specific complexities, ensuring consistent file viewing behavior across iOS, Android, and Windows while utilizing each platform's native file viewers for reliability and performance.

Overview

Native file viewer for React Native. Preview any type of file supported by the mobile device.

Use Cases

Best For

  • Opening local files stored within a React Native app's directory structure for preview.
  • Integrating file picking from device storage (e.g., using react-native-document-picker) and immediately previewing selected files.
  • Downloading files from URLs (e.g., using react-native-fs) and opening them with the device's default viewer.
  • Previewing files from Android assets by copying them to a accessible path before opening.
  • Prompting users on Android to choose from multiple installed apps that support a file type via an 'Open With' dialog.
  • Customizing file viewer behavior with options like display names, dismissal callbacks, and app suggestions on Android.

Not Ideal For

  • Apps requiring embedded, in-app file previewers without launching external applications
  • Expo-managed projects that want to avoid ejecting to the bare workflow
  • Teams needing advanced file manipulation like editing or annotating files within the app
  • Projects demanding perfectly consistent file viewer UI and behavior across all platforms

Pros & Cons

Pros

Native Performance Integration

Leverages iOS QuickLook Framework and Android ACTION_VIEW intents to use device-native viewers, ensuring optimal performance and user experience as described in the README's philosophy.

Cross-Platform Simplicity

Provides a consistent promise-based JavaScript API for iOS, Android, and Windows, abstracting platform-specific complexities while maintaining a unified interface.

Flexible File Sources

Supports opening files from local paths, Android assets (via copying with react-native-fs), and downloaded URLs, with clear examples in the usage section.

Android Customization Options

Offers configurable options like showOpenWithDialog and showAppsSuggestions on Android, allowing tailored user interactions as detailed in the API documentation.

Cons

Android 11+ Configuration Hassle

Requires adding complex <queries> elements to AndroidManifest.xml for API level 30+, with warnings about Play Store approval, making setup error-prone.

Expo Incompatibility

Does not work with Expo managed workflow; projects must eject to bare workflow, limiting its use for teams preferring Expo's simplicity and rapid development.

External Dependency Reliance

Lacks built-in file downloading or picking; developers must integrate additional libraries like react-native-fs or react-native-document-picker, increasing project complexity and maintenance.

Platform Behavior Variance

Relies on native viewers, so file preview experience and options differ across iOS, Android, and Windows, leading to inconsistent user interfaces and potential debugging challenges.

Frequently Asked Questions

Quick Stats

Stars447
Forks111
Contributors0
Open Issues38
Last commit2 years ago
CreatedSince 2017

Tags

#native-module#ios#android#react-native#intent#quicklook#mobile-development#cross-platform#windows

Built With

R
React Native

Included in

React Native35.6k
Auto-fetched 1 day ago

Related Projects

react-native-hyperlinkreact-native-hyperlink

A <Hyperlink /> component for react-native that makes urls, fuzzy links, emails etc clickable

Stars813
Forks85
Last commit3 months ago
react-native-markdown-displayreact-native-markdown-display

React Native 100% compatible CommonMark renderer

Stars789
Forks204
Last commit2 months ago
react-native-responsive-fontsizereact-native-responsive-fontsize

🔠 Responsive fontSize based on screen-size of the device in React-Native

Stars739
Forks39
Last commit4 months ago
react-native-html-to-pdfreact-native-html-to-pdf

Convert html strings to PDF documents using React Native

Stars460
Forks274
Last commit3 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub