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.
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.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
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.