react-link-preview-card
v1.0.2
Published
A React component for generating beautiful link preview cards with metadata
Downloads
134
Maintainers
Readme
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
npm install react-link-preview-card
Usage
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]