# HoverCard _(no submodules)_ - hover-card.variants — `hoverCardContentVariants` is… - [hover-card.variants](./hover-card.variants.md) — `hoverCardContentVariants` is the cva configuration powering the `` floating panel. It is split from… - hover-card.variants — `hoverCardContentVariants` is… - [hover-card.variants](./hover-card.variants.md) — `hoverCardContentVariants` is the cva configuration powering the `` floating panel. It is split from… - hover-card.variants — `hoverCardContentVariants` is… - [hover-card.variants](./hover-card.variants.md) — `hoverCardContentVariants` is the cva configuration powering the `` floating panel. It is split from… - hover-card.variants — `hoverCardContentVariants` is… - [hover-card.variants](./hover-card.variants.md) — `hoverCardContentVariants` is the cva configuration powering the `` floating panel. It is split from… - [hover-card.variants](./hover-card.variants.md) — `hoverCardContentVariants` is the cva configuration powering the `` floating panel. It is split from… ## Purpose `` and its sub-components (``, ``, ``, ``) are the chassis hover-card primitives built on `@radix-ui/react-hover-card`. Use this for non-modal previews that open on hover or focus over the trigger and dismiss on hover-out or blur — link previews, user-mention bios, contextual mini-cards. Distinct from ``: HoverCard is hover-driven (mouse-only by spec; touch devices fall back to tap-to-open) with `openDelay` / `closeDelay` hysteresis. Distinct from ``: HoverCard panels can hold rich content (multiple paragraphs, images, action links); Tooltip is a single short label. ## Features - Opens on hover or focus over the trigger; closes on hover-out or blur. - `openDelay` / `closeDelay` numeric hysteresis (default 700/300 ms — Radix defaults). - Side / align positional API (`side`: top/right/bottom/left; `align`: start/center/end). - Self-portals via ``. - Optional `` decoration. - Theme-driven cva via `useThemedVariants("HoverCardContent")`. - All sub-components forward refs. - `motion-reduce:animate-none` collapses the open/close animations under `prefers-reduced-motion: reduce`. ## Usage: Basic Example ```tsx import { HoverCard, HoverCardContent, HoverCardTrigger, } from "@suaveplan/react-ui"; export function MentionPreview() { return ( @suaveplan Component library for the Suaveplan platform. ); } ``` ## Usage: Advanced Example ```tsx import { HoverCard, HoverCardArrow, HoverCardContent, HoverCardTrigger, } from "@suaveplan/react-ui"; interface User { readonly handle: string; readonly displayName: string; readonly bio: string; readonly avatarUrl: string; } export function UserMention({ user }: { user: User }) { return ( @{user.handle}

{user.displayName}

@{user.handle}

{user.bio}

); } ``` ## API Reference ### `` | Prop | Type | Default | Description | |---|---|---|---| | `open` | `boolean` | _uncontrolled_ | Controlled open state. | | `defaultOpen` | `boolean` | `false` | Initial open state. | | `onOpenChange` | `(open: boolean) => void` | _none_ | Fires on open/close transitions. | | `openDelay` | `number` | `700` | Delay (ms) before opening on hover. | | `closeDelay` | `number` | `300` | Delay (ms) before closing on hover-out. | ### `` Same positional props as `` (`side`, `align`, `sideOffset`, `alignOffset`, `avoidCollisions`, `collisionPadding`). ### ``, ``, `` Direct re-exports of the Radix sub-components. ## Implementation Notes - The chassis NEVER assigns a numeric `z-index` — Radix portals handle stacking. - HoverCard is hover-driven and therefore inappropriate for touch-only UI; consider `` (click-driven) for tap-to-open ergonomics. - `` self-portals via `` so consumers do not need to compose the portal manually. - `align="center"` and `sideOffset={4}` are chassis defaults (matching shadcn upstream).