React Native Preview URL

Installation

Install the package and render your first preview.

Install the package

npm install react-native-preview-url
pnpm add react-native-preview-url
yarn add react-native-preview-url
bun add react-native-preview-url

Confirm peer deps

react-native-preview-url declares react and react-native as peer dependencies — your app provides them. No native code, no autolinking step, no Metro config changes.

Works on React Native (iOS + Android), Expo (managed and bare), and React Native Web. Same component, no platform branches.

Render your first card

Drop it anywhere a View would go:

App.tsx
import { SafeAreaView } from 'react-native';
import { LinkPreview } from 'react-native-preview-url';

export default function App() {
  return (
    <SafeAreaView style={{ flex: 1, padding: 16 }}>
      <LinkPreview url="https://github.com" />
    </SafeAreaView>
  );
}

The first render fires a network request, shows the built-in skeleton loader, then swaps in the card. Tap the card and the URL opens in the user's browser.

Live preview

The same component, running in this page via react-native-web:

Live · same component, every platform
iOSAndroidWeb
react-native-preview-urltap the card to fire onPress

URL

Hit Enter or tap Preview to fetch.

Quick picks

Props

titleLines2

Last event

callback log
Waiting for input. Tap the preview card to fire onPress.

Where to next

On this page