Hover Card

Preview-on-hover surface on bits-ui LinkPreview. Zoom-fades in from the anchor edge in 100ms, dismisses when the pointer leaves both trigger and content.

Usage

Rich content

A profile-style preview — avatar, name, meta strip. The card width is constrained so long bios wrap rather than reflow the layout around the trigger.

Inverted

Set variant="inverted" on the content for a dark surface over a light app — Bloom's signature menu identity. Surface and accent CSS vars swap at the content root, so item rows, separators, and focus rings flip contrast automatically.

HoverCard.Root props

Inherits bits-ui LinkPreview.Root props via spread.

PropTypeDescription
boolean (bindable)Controls visibility. Two-way bindable.
numberMilliseconds of hover before the card opens.
numberGrace period after the pointer leaves before closing.

HoverCard.Content props

PropTypeDescription
'default' | 'inverted'Surface treatment. Inverted swaps popover/accent CSS vars to render dark on light (and light on dark).
'top' | 'right' | 'bottom' | 'left'Preferred anchor side. Collision logic may flip.
'start' | 'center' | 'end'Cross-axis alignment relative to the trigger.
numberDistance in px from the trigger edge.
ComponentProps<HoverCard.Portal>Forwarded to the internal portal.