Components

Hover Card

A card that previews content when a link is hovered.

Installation

npx shadcn@latest add @blank/hover-card

Usage

import {
  HoverCard,
  HoverCardContent,
  HoverCardTrigger,
} from "@/components/ui/hover-card"
<HoverCard>
  <HoverCardTrigger>Hover</HoverCardTrigger>
  <HoverCardContent>Preview content</HoverCardContent>
</HoverCard>

Examples

Profile preview

Hover cards are for sighted mouse users previewing a link; keep anything essential reachable from the link itself.