Components
Hover card

Hover Card

The Hover Card component is a user-friendly, interactive tool designed to display information when a user hovers over a specific trigger element. It offers a variety of features, such as controlled state, customizable positioning, and the use of render props for a more dynamic and flexible experience.

API reference docs for the component. Learn about the props, CSS, and other APIs of this exported module.

HoverCardProps

closeDelay

number

The duration from when the mouse leaves the trigger or content until the hover card closes.

dir

'ltr' | 'rtl'

The document's text/writing direction.

getRootNode

() => ShadowRoot | Node | Document

A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.

id

string

The unique identifier of the machine.

ids

Partial<{ trigger: string content: string positioner: string arrow: string }>

The ids of the elements in the popover. Useful for composition.

onOpenChange

(details: OpenChangeDetails) => void

Function called when the hover card opens or closes.

open

boolean

Whether the hover card is open

openDelay

number

The duration from when the mouse enters the trigger until the hover card opens.

positioning

PositioningOptions

The user provided options used to position the popover content

HoverCardContext

arrowProps

Dict<any>

arrowTipProps

Dict<any>

close

() => void

Function to close the hover card

contentProps

Dict<any>

isOpen

boolean

Whether the hover card is open

open

() => void

Function to open the hover card

positionerProps

Dict<any>

setPositioning

(options?: Partial<PositioningOptions> | undefined) => void

Function to reposition the popover

triggerProps

Dict<any>

HoverCardContentProps

lazyMount

boolean

Whether to enable lazy mounting. Defaults to `false`.

onExitComplete

() => void

present

boolean

unmountOnExit

boolean

Whether to unmount on exit. Defaults to `false`.