Skip to content

Hover Card

SHoverCard is a popup card that opens on hovering the trigger (and on keyboard focus): handy for previewing a profile, a link, or an entity without navigating away. It is built on Reka UI (portal, open/close delays, positioning). The trigger is the #trigger slot (as-child), the content is the default slot.

Basic usage

Positioning

The side (where the card appears) and align (alignment along that side) props set the card position relative to the trigger.

External control

The open prop (two-way binding with v-model:open) lets you open the card programmatically in addition to hovering.

API

Props

NameTypeDefaultDescription
squarebooleanundefinedSquare corners: removes the rounding (rounded by default).
side | "right" | "left" | "top" | "bottom""bottom"Side of the trigger the card appears on.
align"start" | "center" | "end""center"Alignment along the chosen side.
side-offsetnumber8Offset from the trigger in pixels.
open-delaynumber300Delay before opening after hover, in ms.
close-delaynumber200Delay before closing after the pointer leaves, in ms.
flatbooleanundefinedRemoves the shadow. Overridden by the elevation prop when it is set.
elevation0 | 1 | 2 | 3 | 4 | 5undefinedShadow level 0–5 (scale); 0 means no shadow. Overrides flat.
openbooleanfalseWhether the card is open. Two-way binding via v-model:open.

Events

NameSignatureDescription
update:open(value: boolean) => voidEmitted when open changes. Used for two-way binding (v-model:open).

Slots

NameDescription
triggerTrigger element that shows the card on hover.
defaultCard content.