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:
Installation (Shadcn Registry)
# Install via the configured @apple-liquid namespace (includes liquid-surface and liquid-glass)
npx shadcn@latest add @apple-liquid/hover-cardInline Collaborator Card
Display unobtrusive profile previews for mentioned teammates or entities inside prose, comments, or documentation:
Placement
Customize expansion side and alignment using side and align:
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 Type | Open | Close |
|---|---|---|
| Mouse / Trackpad (macOS 27) | Hover or keyboard focus after a short delay | Move pointer away from trigger & card, or press Esc |
| Touch / Stylus (iOS 27) | Tap to toggle; long-press (~0.45s) always opens preview | Tap 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
onOpenChangenormally.
Props API
HoverCardContent
| Prop | Type | Default | Description |
|---|---|---|---|
side | 'top' | 'bottom' | 'left' | 'right' | 'bottom' | Popup side |
sideOffset | number | 8 | Distance in px between card and trigger |
align | 'start' | 'center' | 'end' | 'center' | Alignment along the anchor axis |
glass | boolean | true | Liquid Glass material reacting to glass tint; false renders a 100% opaque surface |
Field
Apple 27 form typography combining labels, controls, descriptions, and validation errors, with vertical, horizontal, and responsive layouts, legends, separators, and Inset Grouped choice cards.
Icon Picker
Pick any of 200k+ Iconify icons — search by keyword or browse a set — from a Select-style trigger that opens a Liquid Glass popover on desktop and an iOS 27 bottom Drawer on mobile. DynamicIcon renders any icon by name.