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

    92
  • Cost Meter

    Cost Meter

    31
  • Message Scroller

    Message Scroller

    26
  • Quota Banner

    Quota Banner

    21
  • Background Inbox

    Background Inbox

    20
  • Image Generation Loader

    Image Generation Loader

    18
  • Commit

    Commit

    18
  • Attachments

    Attachments

    17

Explore more

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