Link Preview

A rich link card with an optional 2:1 cover image, title, two line description and the URL, opening in a new tab. Good for chat messages, posts and bookmarks.

src/registry/ui/link-preview.tsx/r/link-preview.json

Installation#

bash
npx shadcn@latest add @minidev/link-preview

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/link-preview.json

Usage#

tsx
import { LinkPreview } from "@/components/ui/link-preview"

export function Example() {
  return <LinkPreview />
}

API reference#

LinkPreview props
PropTypeDefault
url*string-
title*string-
descriptionstring-
imagestring-
classNamestring-

* required

Dependencies#

npm

React only

Built from

All media and upload components