GitHub Stars

Hover Card

For sighted users to preview content available behind a link.

Installation

npx shadcn@latest add @fulldev/hover-card

Usage

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

Composition

Use the following composition to build a HoverCard:

HoverCard
├── HoverCardTrigger
└── HoverCardContent

Examples

API Reference

See the GitHub source code for more information on props. See the data-slot docs for more information on interactivity.