Hover Card

Overlays

For sighted users to preview content available behind a link.

Import

import { HoverCard, HoverCardContent, HoverCardTrigger } from "@/components/ui/hover-card";

Usage

Default

Hover over the link to see the preview.

API Reference

defaultOpen
boolean

The open state of the hover card when it is initially rendered

open
boolean

The controlled open state of the hover card

onOpenChange
(open: boolean) => void

Event handler called when the open state of the hover card changes

openDelay700
number

The duration from when the mouse enters the trigger until the hover card opens

closeDelay300
number

The duration from when the mouse leaves the trigger until the hover card closes