--- title: Hover Card description: Hover cards preview rich content behind a link or control on hover or focus. category: Overlays --- import { meta as HoverCardMeta, Default } from '@/content/stories/hover-card'; import Canvas from '@/components/component-docs/canvas'; import Demo from '@/components/component-docs/demo'; export const config = { dependencies: { components: [Canvas, Demo], scripts: [ '../../components/component-docs/demo.script.tsx', '../../components/component-docs/canvas.script.tsx', '../../components/component-docs/controls.script.tsx', ], }, }; # Hover Card
Hover cards preview rich content behind a link or control on hover or focus — profiles, link previews, and other supplementary detail.
## Try itJane Cooper
Product designer on the Radiant team.
Product designer on the Radiant team.
Use `RuiTooltip` for short, non-interactive descriptions. Use `RuiHoverCard` when the preview includes links, avatars, or other focusable content.
## Theming The preview panel is often portaled; override `--rui-hover-card-*` on `.rui-hover-card__content`. | Part | Default | Override | | --- | --- | --- | | Width / padding | `20rem`, `--space-inset` | `--rui-hover-card-width`, `--rui-hover-card-padding` | | Fill / border / radius / shadow | `--background`, `--border`, `--radius-container`, `--shadow-overlay` | `--rui-hover-card-surface`, `--rui-hover-card-border-color`, `--rui-hover-card-radius`, `--rui-hover-card-shadow` | | Z-order | `overlay` | theme z-index | ```css .rui-hover-card__content { --rui-hover-card-width: 24rem; } ``` ## Accessibility - The same information should remain available without hover (for example via navigation to a full profile page). - The preview dialog has a default accessible name (`Preview`). Override with `content-label` when needed. - Keyboard users can Tab into card content while it is open. - Press Escape to dismiss. ## API `RuiHoverCard` is a custom element (`