Syed Hasnain

Link Preview

Component 1

About

A horizontal link preview with an image, seller details, and optional product pricing and ratings.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Link Preview to your project and fits it to your theme.

Code

How Link Preview is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import LinkPreview from '@/components/ui/link-preview'

export default function Demo() {
  return (
    <LinkPreview
      className="w-full max-w-lg"
      imageSrc="https://cdn.21st.dev/assets/mirror/98/98a8eee16a919044ee6761ac3c7cea9fab1f4555a8f946e14f4f2d3fab3f8580.jpg"
      price="$75.65"
      rating={4.7}
      reviewCount="38K"
      seller="Amazon.com-Seller"
      siteName="Amazon.com"
      title="Eau de Parfum"
      url="https://www.amazon.com/s?k=eau+de+parfum"
    />
  )
}

Dependencies

More by Syed Hasnain

View all
  • Color Picker

    Color Picker

    77
  • Cost Meter

    Cost Meter

    29
  • Quota Banner

    Quota Banner

    21
  • Message Scroller

    Message Scroller

    21
  • Commit

    Commit

    17
  • Image Generation Loader

    Image Generation Loader

    15
  • Attachments

    Attachments

    15
  • Citations

    Citations

    14

Explore more

Part of Pasta UI — browse the full library on 21st.dev.