react-link-preview-card
Version:
A React component for generating beautiful link preview cards with metadata
47 lines (34 loc) • 1.02 kB
Markdown
A React component that generates beautiful preview cards for URLs, supporting YouTube videos, articles, and general web pages.
- 🎨 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
```bash
npm install react-link-preview-card
```
```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>
);
}
```
| Prop | Type | Description |
|------|------|-------------|
| url | string | The URL to generate a preview for |
Copyright (c) [2024] [Sachin kumar maurya]