Syed Hasnain

Link Preview

Component 2

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

    246
  • Cost Meter

    Cost Meter

    65
  • Attachments

    Attachments

    57
  • Message Scroller

    Message Scroller

    56
  • Background Inbox

    Background Inbox

    49
  • Commit

    Commit

    48
  • Approval Card

    Approval Card

    39
  • Quota Banner

    Quota Banner

    38

Explore more

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