byronwade/ui
Application UI

Overlays · Application UI

Hover Card

A compound component that displays a floating preview card when hovering over a trigger element, built on Base UI's PreviewCard primitive.

Feature showcase

Installation

Features

  • 6 examples

    Default, Alignment, Controlled, Placement, Rich Content, With Delay.

API

Props

PropTypeDefaultDescription
side"top" | "bottom" | "left" | "right" | "inline-start" | "inline-end""bottom"Which side of the trigger the card appears on (HoverCardContent only).
sideOffsetnumber4Distance in pixels between the trigger and the card (HoverCardContent only).
align"start" | "center" | "end""center"Alignment of the card relative to the trigger (HoverCardContent only).
alignOffsetnumber4Offset in pixels along the alignment axis (HoverCardContent only).
classNamestring-Additional CSS class names to apply to the popup element (HoverCardContent only).

Source and related

FilePath
Componentregistry/ui/hover-card.tsx
Default examplecontent/examples/hover-card/default.tsx
Alignment examplecontent/examples/hover-card/alignment.tsx
Controlled examplecontent/examples/hover-card/controlled.tsx
Placement examplecontent/examples/hover-card/placement.tsx
Rich Content examplecontent/examples/hover-card/rich-content.tsx
With Delay examplecontent/examples/hover-card/with-delay.tsx