For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/components/hover-card.md.

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.

Source · Storybook

Usage

import { AgentAvatar } from '@wallarm-org/design-system/AgentAvatar';
import { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';
import { AgentItem, AvatarContent, AvatarName } from '@wallarm-org/design-system/Avatar';
import { Badge } from '@wallarm-org/design-system/Badge';
import { HoverCard, HoverCardAction, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger } from '@wallarm-org/design-system/HoverCard';
import { Zap } from '@wallarm-org/design-system/icons';
import { Link } from '@wallarm-org/design-system/Link';
import { Separator } from '@wallarm-org/design-system/Separator';
import { HStack } from '@wallarm-org/design-system/Stack';
import { Tag } from '@wallarm-org/design-system/Tag';

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>.

Props

PropTypeDefaultDescription
openboolean | undefinedControlled. Pass open only together with onOpenChange feeding it back, or the card never moves (zag controlled mode).
onOpenChange((open: boolean) => void) | undefinedArk's details are unwrapped to a boolean, as in Popover.
idsElementIds | undefinedOverride the trigger element's id. Pass the same id to a Tooltip's ids.trigger to compose both triggers on one element via nested asChild without an extra wrapper node — otherwise the outer trigger's id wins and the other component can't find its own anchor.
data-testidstring | undefined

HoverCardAction

PropTypeDefaultDescription
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
type"button" | "submit" | "reset" | undefined
disabledboolean | undefined
namestring | undefined
valuestring | number | readonly string[] | undefined
asChildboolean | undefined
data-testidstring | undefined
loading{ true: string; }
asC | undefined

HoverCardContent

PropTypeDefaultDescription
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
data-testidstring | undefined

HoverCardDescription

PropTypeDefaultDescription
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
data-testidstring | undefined

HoverCardHeader

PropTypeDefaultDescription
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
data-testidstring | undefined

HoverCardTitle

PropTypeDefaultDescription
variant"person" | "agent" | undefinedpersonagent sets the name in Geist Pixel. Default person.
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
data-testidstring | undefined

HoverCardTrigger

PropTypeDefaultDescription
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined
type"button" | "submit" | "reset" | undefined
disabledboolean | undefined
namestring | undefined
valuestring | undefinedThe value that identifies this specific trigger
data-testidstring | undefined

Explorer