Skip to Content
Liquid Glass UI
Components

HoverCard

macOS 27 22px-radius Liquid Glass hover preview card for user profiles, link summaries, and quick design-spec previews with automatic touch-input adaptation.

Built on @base-ui/react/preview-card, preserving the <HoverCard> / <HoverCardTrigger> / <HoverCardContent> compositional API with a 22px corner radius and <LiquidSurfaceBackdrop tone="menu" /> edge refraction for lightweight, legible previews.

Liquid Glass Project Preview

Hover or focus the trigger button on desktop (tap or long-press on touch devices) to preview the card, and adjust the left Glass Tint slider to see background text refraction:

apple-liquid-ui/preview/hover-card-liquid-hero
MacBook · 16:10

Installation (Shadcn Registry)

# Install via the configured @apple-liquid namespace (includes liquid-surface and liquid-glass)
npx shadcn@latest add @apple-liquid/hover-card

Inline Collaborator Card

Display unobtrusive profile previews for mentioned teammates or entities inside prose, comments, or documentation:

apple-liquid-ui/preview/hover-card-profile
MacBook · 16:10

Placement

Customize expansion side and alignment using side and align:

apple-liquid-ui/preview/hover-card-link-preview
MacBook · 16:10

Pointer vs. Touch Interaction

Because touch screens have no hover state, HoverCardTrigger adapts by pointer type (finger/stylus, regardless of viewport width—works seamlessly on iPad too):

Input TypeOpenClose
Mouse / Trackpad (macOS 27)Hover or keyboard focus after a short delayMove pointer away from trigger & card, or press Esc
Touch / Stylus (iOS 27)Tap to toggle; long-press (~0.45s) always opens previewTap trigger again, or tap anywhere outside the card
  • When the trigger is a real link (<a href>), tapping navigates normally while long-pressing opens the preview, matching iOS link previews.
  • Opening via long-press suppresses the trailing click event and blocks native callouts/text selection.
  • The card stays anchored near the trigger, flips automatically when constrained, and fires onOpenChange normally.

Props API

HoverCardContent

PropTypeDefaultDescription
side'top' | 'bottom' | 'left' | 'right''bottom'Popup side
sideOffsetnumber8Distance in px between card and trigger
align'start' | 'center' | 'end''center'Alignment along the anchor axis
glassbooleantrueLiquid Glass material reacting to glass tint; false renders a 100% opaque surface

On this page