shadcn.io is an independent project built on shadcn/ui
The tile shows a dollar icon, $45.2k, and Monthly Revenue. The card is titled Revenue Breakdown: income $52.8k, expenses $7.6k, net profit $45.2k, and +18.2% vs. last month.
Reach for it on a dashboard when a headline number needs its parts. A tap should open a Popover instead. In Svelte, Ark UI does not calculate these figures. They are written in the demo.
Installation
Anatomy

Usage
<HoverCard><HoverCardTrigger>{#snippet asChild(props)}<button {...props({ class: "flex items-center gap-2 rounded-lg border bg-card p-4 text-start hover:bg-accent", type: "button" })}><DollarSignIcon aria-hidden="true" class="size-5 text-success" /><div><div class="font-bold text-2xl">$45.2k</div><div class="text-muted-foreground text-sm">Monthly Revenue</div></div></button>{/snippet}</HoverCardTrigger><HoverCardContent class="w-80"><div class="flex flex-col gap-3"><h4 class="font-semibold text-sm">Revenue Breakdown</h4><div class="flex flex-col gap-2 text-sm"><div class="flex items-center justify-between rounded-md bg-muted p-2"><div class="flex items-center gap-2"><ArrowUpIcon aria-hidden="true" class="size-4 text-success" /><span class="text-muted-foreground">Income</span></div><span class="font-medium">$52.8k</span></div><div class="flex items-center justify-between rounded-md bg-muted p-2"><div class="flex items-center gap-2"><ArrowDownIcon aria-hidden="true" class="size-4 text-destructive" /><span class="text-muted-foreground">Expenses</span></div><span class="font-medium">$7.6k</span></div><div class="flex items-center justify-between pt-2"><span class="text-muted-foreground">Net Profit</span><span class="font-bold text-lg text-success">$45.2k</span></div></div><p class="text-muted-foreground text-xs">+18.2% vs. last month</p></div></HoverCardContent></HoverCard>FAQ
What is in the card?
Revenue Breakdown, Income $52.8k with an up arrow, Expenses $7.6k with a down arrow, Net Profit $45.2k in large text, and +18.2% vs. last month.
How is the stat tile made the trigger?
HoverCardTrigger renders the stat tile through its asChild snippet.
How are gains and losses colored?
With tokens: text-success for the up arrow and the net profit, text-destructive for the down arrow. The arrows also carry the meaning, so color isn't the only cue.
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 tile 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
No extra props in this demo. The rest is on the Hover Card page.




