@lowkey/react-native-link-preview
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.
Installation
npm install @lowkey/react-native-link-previewor
yarn add @lowkey/react-native-link-previewthen install pods
cd ios/ && pod installUsage
Get URL metadata
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;
}
*/Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT