Hover Card
A Shadcn hover card projected from the Base hover-card protocol.
Ordinary demos on this page explicitly use Shadcn Rhea, with matching examples. This does not change public compatibility defaults or imply complete browser, native-host or visual acceptance. Neutral Surface/Text atoms retain their own public semantics; the consumer composition supplies the family presentation theme.
Base Hover Card owns open state. Root accepts controlled open or uncontrolled defaultOpen, plus openDelay and closeDelay. Trigger hover or focus, and Content hover, only submit a request; they do not bypass that owner. Content adds side, align, and the numeric offsets below. Arrow and forceMount are not props of this surface.
The demo opens @proto-ui after 150ms and closes after 300ms. Content is side="bottom" and align="center".
Install
Section titled “Install”
npx @proto.ui/cli@latest add wc shadcn-hover-card
Replace wc with react, vue or vue2 to generate the facade for that host.
Passing open selects controlled mode. Delays must be finite and at least 0; any other number falls back to the default.
| Prop | Type | Default |
|---|---|---|
open | boolean undefined | uncontrolled |
defaultOpen | boolean | false |
disabled | boolean | false |
openDelay | number | 700 |
closeDelay | number | 300 |
side | 'top' 'right' 'bottom' 'left' | bottom |
align | 'start' 'center' 'end' | center |
sideOffset | number | 4 |
alignOffset | number | 0 |
avoidCollisions | boolean | true |
collisionPadding | number | 0 |
side through collisionPadding belong to Content. Trigger only adds disabled, which defaults to false. Root exposes open, openHoverCard, close, toggle, and openChange.