‮Skip to content‬
uiify

Hover card

‮Card with preview content that opens on hover.‬

‮Browsers‬
Chrome 114+Firefox 125+Safari 17+
‮Tier‬
1
‮Bundle compressed‬
1.92 kB
‮Forced layout budget‬
0 ms
‮Axe budget‬
0
‮SSR compatible‬
‮Yes‬
‮Published contract‬
‮Test harness‬

‮Playground‬

Hover Card

Closed

UIify

Native-first React components with accessible semantics and optional styles.

Open-source · React 19 · Server compatible

Open

@uiify
UIify

Native-first React components with accessible semantics and optional styles.

Open-source · React 19 · Server compatible

‮API‬

HoverCard.Root

‮Prop‬‮Type‬‮Default‬‮Description‬
openboolean—‮Controlled open state.‬
defaultOpenbooleanfalse‮Uncontrolled initial open state.‬
onOpenChangePopoverChangeHandler—‮Called with the next open state and the details of what caused the change.‬
openDelaynumber700‮Milliseconds the pointer must rest on the trigger before the card opens.‬
closeDelaynumber300‮Milliseconds after the pointer leaves before the card closes, so it can be moved onto the card.‬
idstring—‮Base id for the anchor and content; generated when omitted.‬
childrenReactNode—‮The Trigger and Content parts.‬

HoverCard.Trigger

‮Prop‬‮Type‬‮Default‬‮Description‬
classNamestring—‮Class applied to the trigger element.‬
childrenReactNode—‮Content of the trigger element.‬
asElementType"button"‮Render a different element or component in place of the default tag.‬
renderReactElement | ((props, state) => ReactElement)—‮Replace the rendered element while keeping behavior and accessibility wiring.‬

HoverCard.Content

‮Prop‬‮Type‬‮Default‬‮Description‬
side"top" | "right" | "bottom" | "left""bottom"‮Side of the trigger the card is anchored to.‬
align"start" | "center" | "end""center"‮Alignment of the card along the chosen side.‬
classNamestring—‮Class applied to the card surface.‬
childrenReactNode—‮Content of the card.‬
asElementType"div"‮Render a different element or component in place of the default tag.‬
renderReactElement | ((props, state) => ReactElement)—‮Replace the rendered element while keeping behavior and accessibility wiring.‬

‮Keyboard‬

‮Key‬‮Action‬
Tab‮Move focus to/from the control‬
Enter / Space‮Activate when focused (button-like controls)‬

‮Accessibility‬

‮Uses semantic HTML where possible. Inspect rendered markup in the playground — ARIA is added only when native elements are insufficient.‬

‮Styling hooks‬

data-disabled