Fully native link metadata generation to create link preview in React Native. Metadata generation happens on native thread, so the JS thread stays unblocked with 60fps.
Supports most of the basic links, Spotify, Youtube and Facebook.
Supported on iOS and Android.
lg-demo.mov
npm install @lowkey/react-native-link-preview
or
yarn add @lowkey/react-native-link-preview
then install pods
cd ios/ && pod install
import LinkPreview from "@lowkey/react-native-link-preview";
// ...
const url = 'https://www.apple.com/ipad/';
const metadata = await LinkPreview.generate(url);
/*
console.log(metadata);
{
title: string;
type: string;
url: string;
imageURL: string;
description: string;
}
*/
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT