Component
Shows a rich preview card when hovering over a trigger element. Useful for user profiles, link previews, or contextual info.
View component changelog| Shortcut | Description |
|---|---|
Tab | Preserves the browser's normal tab order; HoverCard does not move focus when the trigger receives or loses focus. |
Escape | Dismisses the hover card when it is open. |
| Reference | What Rad UI follows |
|---|---|
Uses dialog semantics for the floating preview content when open; label interactive or richly structured content with accessible text. |
Import all parts of the component and piece them together
The root HoverCard component.
| Prop | Type | Default |
|---|---|---|
open | boolean | -- |
defaultOpen | boolean | false |
openDelay | number | 100 |
closeDelay | number | 200 |
onOpenChange | function | -- |
The floating card panel that appears on hover. Accepts a size prop to control padding and max-width.
| Prop | Type | Default | Description |
|---|---|---|---|
size | string | "" | Controls the padding, max-width, and font size of the card. One of: small, medium, large. |
className | string | "" | Additional CSS classes applied to the content element. |