HoverCard
A preview of a person or an agent, opened by resting on their name: media, the name, a status badge, a subtitle, a few facts and at most one action. It opens after 600 ms and stays while the pointer is on it.
Use it in read contexts only — tables, attributes, the timeline and history. Never in a menu, a select or a filter, where hovering a name is choosing it.
The card is supplementary. Focus never moves into it, so its links and its action are out of keyboard reach: never put the only path to an action or a fact in the card. The action goes where the name goes, and every row link also exists at that destination. A card with an action of its own needs a Popover.
One action at most, as HoverCardAction. The product leaves out a row that does not apply (Approvals for agents that never ask) and the action when the viewer lacks the permission. A row that applies but is empty passes isEmpty and shows the em dash; never write "None".
Fetch inside the content: it mounts only when the card opens, so a data component in HoverCardContent fetches on open with no open wiring. While it loads, keep the known name and the row labels, and skeleton only the values.
On an element that already has a Tooltip, nest HoverCardTrigger and TooltipTrigger asChild on it and pass the same ids.trigger to HoverCard and Tooltip. Tooltips outside the content close while the card is up, so neither needs open wiring.
data-analytics-id goes on the trigger's child — the name's span, link or button — on HoverCardAction, and on each row Link. The card adds no seam of its own.
The DS has no status mapping; pass a Badge variant='dotted' type='secondary'. People: Active green, Invited blue, Invite expired w-orange, Deactivated gray. Agents: On duty green, Working blue, Needs you amber, Failed red, Deactivated and Not set up gray, Inviting blue.
Usage
Examples
User
A person: the 56 px plate and the name in Geist, their email, roles and when they were last active — the exact time is in the tooltip.
Without action
What the product leaves out. Lens never asks for approval, so it has no Approvals row, and a viewer without access to agents gets no action. Rest on the name to open it.
Loading
While the product fetches: the known name and the real row labels stay, and only the values are skeletons, so the card keeps its shape. No action until the permission is known.
Unavailable
A deleted person or a failed fetch: the header alone, with the known name and the product's reason. No separator, rows or action.
Long values
The card never grows past 320 px. The name and the email end with "…" and show in full in a
tooltip, tags wrap, and a plain string value takes the OverflowTooltip recipe.
In table
A name cell, as in the users table. The cell forces its direct child to block, so the card sits
in a <span>, and only HoverCardTrigger goes inside AvatarName — AvatarName renders its
children again in its own tooltip. The name is plain text, as everywhere: the card's action
opens the user. The last name is truncated: its tooltip repeats the trigger, so that copy shares
the trigger's id and test id — a known limitation until AvatarName can show plain text in its
tooltip.
With tooltip
A trigger that already has a tooltip. Nest the two asChild triggers on the one element and give
both roots the same ids.trigger, so each machine finds it. The tooltip shows first; when the
card opens the tooltip closes at once and stays off while the card is up, with no open
wiring.
Analytics
Analytics attributes go on the elements themselves: the trigger's child, each row Link and
HoverCardAction. The card adds no seam of its own, so each data-analytics-id lands on the
real element: the name's <span>, the row <a> and the action's <a>.