Skip to content
Design System
GitHub

Hover card

v0.21.0Beta

A preview of what a link leads to, on hover and keyboard focus. Preview only: never the only way to the facts or actions in it.

  • 14:32Door 4 left open7F3A
  • 14:18Battery under 15 %9C44
  • 14:02Lost connection2B10

Hover card default

Install
npx shadcn add @syncrobotic/hover-card

Also installs: radix-ui, @syncrobotic/cn

Overview

When to use

  • Robot, site or dataset IDs in tables, event logs and text, where a glance saves opening the page.

Use something else

  • Anything someone needs, or anything to click: it is not on touch screens and screen readers are not told about it. Put it on the page, or in a Popover opened by a click.
  • The name of an icon button: Tooltip.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

9C44 is returning to its dock with 12 % battery; 7F3A takes over the perimeter patrol until it is charged.

Hover card in text

Usage rules

  • Preview only. Hover does not exist on touch and screen readers are not told the card is there, so nothing in it may be the only way to a fact or an action: the trigger is a real link to the page that has it all.
  • No controls inside: a button or link in the card cannot be reached reliably. Something to act on is a Popover (opened by a click) or the page itself.
  • Keyboard focus on the link opens it, Esc or moving on closes it. It waits 500 ms before opening, so a pointer crossing a list does not flash cards.
  • A few facts: a name, a state with its shape and word, a level as a Meter, when it was last seen. More than that is the page.

Changelog

  • 0.21.02026-11-20First release: Radix HoverCard in the popover's look, 500 ms before opening and 300 ms before closing.

How to upgrade