Design System
Overlays

Hover card

A rich preview shown on hover, such as a member summary behind a name. Never put required information here alone.

Purpose

A hover card previews what sits behind a reference — hover a member's name in a claims list and see their identity summary without navigating. It is a convenience layered on top of a link: everything in it must also live on the page the link goes to.

Two neighbours cover the other cases:

  • Plain text hint on a control → Tooltip.
  • Content someone must interact with, or open deliberately → Popover, which opens on click and takes focus properly.

Member preview

The trigger is usually an inline link; the card composes freely — avatar, badge, key figures.

Structure

PropertyValue
Surface--popover with 1px --border and --shadow-8
Radius--radius-lg
Width256px default (w-64) — override per use, e.g. w-72
Padding16px (p-4)
Placement6px offset, centre-aligned on the trigger; fade + zoom
TimingOpens after 700ms, closes after 300ms (openDelay / closeDelay)

Best practices

Do

  • Attach it to a real link — the card previews the destination, the click still navigates.
  • Keep the content read-only: names, statuses, key figures.
  • Shorten openDelay (the story uses 200ms) where previewing is the point of the surface.

Don't

  • Put information here that exists nowhere else — keyboard, screen-reader and touch users never see it.
  • Put buttons or links inside — keyboard focus cannot enter the card.
  • Use it as a hint on an icon button; that is Tooltip's job.
  • Rely on it on touch devices — it deliberately does not open on touch.

Accessibility & keyboard

Be honest about what this pattern is: an enhancement for sighted pointer users.

  • The trigger opens on pointer hover and on keyboard focus (Radix wires onFocus/onBlur), and Esc dismisses — so keyboard users can make the card appear.
  • But keyboard focus cannot move into the card, and screen readers do not announce its content. Touch input is explicitly excluded by the primitive.
  • The card is therefore strictly duplicative by contract: every fact in it must be reachable by following the trigger link.
  • HoverCardTrigger renders an <a> by default — pass your own link or button via asChild.
  • Keyboard: Tab to the trigger to show; Tab away or Esc to dismiss.

Props

All parts pass the Radix Hover Card props through unmodified — HoverCard takes open, defaultOpen, onOpenChange, openDelay and closeDelay; HoverCardContent takes the placement props (side, align, sideOffset…). There is no separate props interface to document.

Every HoverCard part and prop in Storybook

On this page