Installation
Theme
Mode

Overlays & feedback

Hover preview card

Hover a task, project or person reference and a rich card peeks its details in place — status, assignee, progress, due date — without navigating away. The “don’t make me click to remember what ORB-241 is” affordance. Cards differ by type, follow the reference’s anchor, and stay open while you reach for them.

$npx shadcn@latest add @orbit/hover-preview

Overview

Live — hover the underlined onboarding flow v2 or Maya Rivera to peek a task vs. a person card. Move onto the card and it stays.

In a comment, doc or activity feed

Picking up where we left off — the onboarding flow v2 is the last blocker before launch. It depends on API rate limiting shipping first, and Maya Rivera owns both. Once the design system audit lands we can close out the milestone.

Hover any underlined reference to peek its details — no navigation.

Capabilities

References everywhere — comments, docs, the feed — become self-explaining without sending you to another page.

Peek, don’t navigate
A hover surfaces the whole record — status, owner, progress, due — so you keep your place instead of opening it.
Type-aware cards
A task shows progress and assignee; a person shows their open count and projects. Each reference renders the right card.
Intentional delay
A short open delay keeps the card from flashing as the pointer sweeps across text, and a close grace period lets you reach it.
Smart placement
The card anchors under the reference but flips above when it would run off the bottom, and nudges in from the edges.

Typed cards

Pass data with type: 'task' or type: 'person' and the matching layout renders — no card markup to write.

Task
Status pill, description, progress bar, assignee, due date, priority, and subtask count.
Person
Avatar, role and timezone, open vs completed counts, and project chips.

Behavior

Placement flips to stay on screen; timing keeps the card intentional.

Placement — side='bottom' (default) or side='top'
Opens below (default): onboarding flow v2Opens above: Maya Rivera
Open delay — default 120ms vs. openDelay={0}
Waits a beat (120ms): design system auditOpens instantly (0ms): design system audit
Escape hatch — renderPreview replaces the typed layouts
Custom card via renderPreview: orbit.app/changelog

Props

PropTypeDefaultDescription
dataHoverPreviewTask | HoverPreviewPersonTyped content. type: 'task' renders status pill, description, progress, assignee, due, priority, subtasks; type: 'person' renders avatar, role line, open/completed stats, project chips. All detail fields are optional.
renderPreview(data?) => ReactNodeEscape hatch — render a fully custom card body instead of the typed layouts.
openDelaynumber120Wait before opening on hover, in ms.
closeDelaynumber140Grace period before closing — lets the pointer cross into the card.
side"top" | "bottom""bottom"Anchor side. Flips automatically to avoid collisions.
align"start" | "center" | "end""start"Alignment along the reference.
sideOffsetnumber8Distance from the reference in px.
open / defaultOpenbooleanControlled / uncontrolled open state.
onOpenChange(open: boolean) => voidCalled when the card opens or closes.
renderReactElementReplace the default link trigger with any element; handlers and ARIA merge onto it.
contentClassNamestringExtra classes on the 300px card — e.g. to override its width.
…restAnchorHTMLAttributesForwarded to the trigger <a> (href, onClick, …), including ref.

Usage

A hover preview is a read-only peek. It supplements a clickable link — it never replaces one, and never traps the pointer.

Do

Keep the link clickable

The preview is extra. The underlined text must still navigate on click — hover-only access strands keyboard and touch users.

Don’t

Put actions in the peek

A preview is for reading. Buttons that mutate data belong on the full record, not in a card that vanishes on mouse-out.

Do

Bridge the gap

Allow the pointer to travel from the link onto the card without it closing — otherwise the card is impossible to interact with.

Don’t

Rely on hover alone

Touch has no hover. Pair the preview with tap-to-open detail so the same context is reachable without a mouse.

Keyboard & accessibility

Built on Base UI PreviewCard: the trigger is a real link that keyboard focus can open, Escape dismisses the card, and nothing in the preview exists only on hover — the destination page always has it too.

hoverOpens the card after a 120ms delay
focusKeyboard focus opens it too — the trigger is a real link
EscDismisses the card while open
mouse-outA 140ms grace period bridges the gap into the card