Skip to content

Link Preview

An inline link that shows a small card (cover, title, description, site) on hover or keyboard focus; Escape closes it. On touch screens it's just a link.

Installation

pnpm dlx shadcn@latest add @portfolio-kit/link-preview
First time? Add the @portfolio-kit registry to components.json
components.json
{
  "registries": {
    "@portfolio-kit": "https://www.parthjadhav.com/products/portfolio-kit/r/{name}.json"
  }
}

Usage

Examples

In an article

Text-only previews for internal links in running prose: no cover, a custom site label, and a quicker openDelay for readers who skim.

Custom card

Pass preview to build your own card from the LinkPreview* parts — here, repository stats for the open-source projects a developer mentions in their bio.

API Reference

Used in