shadcn.io is an independent project built on shadcn/ui
The trigger is the name Team Planning Session. The card adds an Upcoming badge, a description of the quarterly planning meeting, Monday, January 15, 2024, 2:00 PM to 3:30 PM, and 12 attendees.
It belongs on a calendar or an agenda when the name is not enough. Touch screens have no hover, so a Popover is the stand-in. In Vue, Ark UI keeps the card open while the pointer moves onto it.
Installation
Anatomy

Usage
<HoverCard>
<HoverCardTrigger :asChild="true">
<button class="font-medium text-sm underline underline-offset-4" type="button">
Team Planning Session
</button>
</HoverCardTrigger>
<HoverCardContent class="w-80">
<div class="flex flex-col gap-3">
<div class="flex items-center justify-between">
<h4 class="font-semibold text-sm">Team Planning Session</h4>
<Badge variant="secondary">Upcoming</Badge>
</div>
<p class="text-muted-foreground text-sm">
Quarterly planning meeting to discuss goals, priorities, and team alignment for Q1.
</p>
<div class="flex flex-col gap-2 text-muted-foreground text-sm">
<div class="flex items-center gap-2">
<CalendarIcon aria-hidden="true" class="size-4" />
<span>Monday, January 15, 2024</span>
</div>
<div class="flex items-center gap-2">
<ClockIcon aria-hidden="true" class="size-4" />
<span>2:00 PM - 3:30 PM (90 min)</span>
</div>
<div class="flex items-center gap-2">
<UsersIcon aria-hidden="true" class="size-4" />
<span>12 attendees</span>
</div>
</div>
</div>
</HoverCardContent>
</HoverCard>FAQ
What is in the card?
The title with an Upcoming Badge, the description, then a calendar, a clock and a people icon, each beside its detail: Monday, January 15, 2024, 2:00 PM - 3:30 PM (90 min) and 12 attendees.
How is the event name made the trigger?
HoverCardTrigger takes as-child, and the demo passes the event name.
Should the event name be a link?
Make it a link when it leads to the event's page. The demo uses a button because it only opens the preview.
How do I change how fast the card opens and closes?
The card opens a moment after the pointer rests on the trigger and stays up long enough for the pointer to move into it. Both delays are in milliseconds.
Set openDelay and closeDelay on HoverCard; they default to 10 and 100. positioning picks another side than the bottom.
Does the card open from the keyboard and on touch screens?
Focusing the event name opens the card, moving focus away or pressing Escape closes it. Touch screens have no hover, so keep what matters reachable elsewhere, or use a Popover when the card has to open on a tap.
API Reference
Hover Card
Sets asChild. The rest is on the Hover Card page.
Badge
Sets variant="secondary". The rest is on the Badge page.






