Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Hover Card examples · Stats

Performance Stats Hover Card for React

An uptime badge that opens a system health card with uptime, response time and error rate.

Framework
UI library

A 98.5% Uptime badge opens a System Performance card: a Healthy badge, an uptime bar, the response time and the error rate. Use it in status bars and admin headers where health fits in a badge but the details don't.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

What is in the card?

System Performance with a Healthy outline badge in text-success, Uptime 98.5% over a bar filled to 98.5% with bg-success, Response Time 124ms and Error Rate 0.02%.

How is the uptime badge made the trigger?

HoverCardTrigger takes the uptime badge through render, a button with its classes.

Is the uptime bar a progress bar?

No, it is two divs, a muted track and a filled bar, because the number beside it already carries the value. Use Progress when the bar has to be announced on its own.

How wide is the card?

w-80 on the card, for the extra content. The class is on HoverCardContent. max-w-full keeps it inside narrow screens.

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. The demo sets delay 10 and closeDelay 100 on HoverCardTrigger. side and align on HoverCardContent place it.

Does the card open from the keyboard and on touch screens?

Focusing the badge 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.