1.0.2 • Published 8 months ago

react-link-preview-card v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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

PropTypeDescription
urlstringThe URL to generate a preview for

MIT License

Copyright (c) 2024

1.0.2

8 months ago

1.0.0

8 months ago