Overlays & Dialogs
@hacline/ui/hover-cardHoverCard
Display a content preview when hovering over or focusing a link.
Usage
Hover over or focus "Avatar documentation" to preview its summary, or click the link to open the full documentation page.
"use client";
import {
HoverCard,
HoverCardContent,
HoverCardTrigger,
} from "@/components/ui/hacline/components/hover-card";
export const Example = () => (
<HoverCard>
<HoverCardTrigger href="/docs/components/avatar">
Avatar documentation
</HoverCardTrigger>
<HoverCardContent sideOffset={8}>
<strong>Avatar</strong>
<p className="text-hl-fg-muted mt-1">
Displays a user or project image, with initials shown while loading.
</p>
</HoverCardContent>
</HoverCard>
);Placement & Arrow
Request placement with side and align, and add HoverCardArrow to indicate the anchor point.
"use client";
import {
HoverCard,
HoverCardArrow,
HoverCardContent,
HoverCardTrigger,
} from "@/components/ui/hacline/components/hover-card";
export const Example = () => (
<HoverCard closeDelay={150} delay={150}>
<HoverCardTrigger href="/docs/tokens">View theme tokens</HoverCardTrigger>
<HoverCardContent align="center" side="top" sideOffset={8}>
<HoverCardArrow />
<p className="font-medium">Colors, radii, and shadows</p>
<p className="text-hl-fg-muted mt-1">
Theme tokens support both light and dark modes.
</p>
</HoverCardContent>
</HoverCard>
);Parts
| Part | Description | Extended Props |
|---|---|---|
HoverCardArrow | An arrow on the card's edge that points at its trigger. | — |
HoverCardContent | The card itself, positioned against its trigger. | size |
HoverCardTrigger | A link by default: pressing it follows the link, and hover or focus opens the card. | — |
Props
Prop
Type
Popover
Interactive floating panel built on @ui-sdk/react/popover with bordered arrows, collision positioning, and nested form support.
Tooltip
Lightweight floating hint built on @ui-sdk/react/tooltip with automatic collision flipping, shortcut display, disabled-button explanations, and touch toggle support.