UNPKG

react-link-preview-card

Version:

A React component for generating beautiful link preview cards with metadata

47 lines (34 loc) 1.02 kB
# React Link Preview Card A React component that generates beautiful preview cards for URLs, supporting YouTube videos, articles, and general web pages. ## Features - 🎨 Beautiful, responsive preview cards - 🎥 YouTube video preview support - 📝 Article and general webpage previews - ⚡ Client-side caching - 🔄 Loading states with skeleton UI - 🎯 Fallback handling for failed requests - 💅 Tailwind CSS styling ## Installation ```bash npm install react-link-preview-card ``` ## Usage ```jsx import { LinkPreview } from 'react-link-preview-card'; function App() { return ( <div> {/* YouTube Video Preview */} <LinkPreview url="https://www.youtube.com/watch?v=your-video-id" /> {/* Article Preview */} <LinkPreview url="https://example.com/your-article" /> </div> ); } ``` ## Props | Prop | Type | Description | |------|------|-------------| | url | string | The URL to generate a preview for | ## MIT License Copyright (c) [2024] [Sachin kumar maurya]