Context Card
A floating card on hover or focus. Use it for entity metadata that is heavier than a tooltip.
Sides
Default side is top. The card flips if it would collide with the viewport.
Alignment
align pins the card to the start, center, or end of the trigger. Default is center.
Rich content
The content slot replaces the content string when the card needs a heading and metadata rows.
Custom element
render (or as) changes the trigger tag. Default is a div. as-child merges behavior onto the child instead.
Best practices
- Context Card is for entity metadata on a name, avatar, or id in a dense row. One-line “why” is Tooltip. Long-form edit or navigation is a Drawer or a page.
- Open delay is 150ms and close delay is 100ms on
ContextCard. Keep that pause so a fast pointer sweep does not flash cards. - Lead with the entity name, then one identifying line, then two to four
Label: valuerows. Unknown values use an em dash, notN/A. - At most one primary action in the card. More than that is a Menu. Never put a destructive confirm in a hover surface — it can dismiss before commit.
- Do not nest a Context Card inside a Tooltip or another card. The trigger keeps its own accessible name; the card is supplementary.
ContextCardTriggeris the usual API.ContextCardplusContextCardContentare for composing your own trigger and delays.