Skip to Content

Popover

An element that pops up from another element over other content; it differs from a tooltip in that it is usually triggered via click instead of hover and can contain interactive elements.

Examples

Theme

This component uses the following default theme:

  • root{}(2 keys)
      Show all

Learn more about how to customize in the Theme documentation.

API

NameTypeDefault
disablePaddingboolean

Disable default padding on popover.

popoverStyleStyleHTMLAttributes<any>

Popover css styles.

popoverClassNamestring

Popover classname.

themePopoverTheme

Theme for the Popover.

autoFocusFocusTargetOrFalse | (() => void) | undefined

Popover has a focus trap that by default focuses the first element in the tab order. With this option you can specify a different element to receive that initial focus, or use false for no initially focused element.

childrenReactNode

Content to wrap.

closeOnClickboolean

Close on any click.

false
closeOnBodyClickboolean

Close when the body is clicked.

true
closeOnEscapeboolean

Close when escape key is triggered.

true
contentany

Content for the tooltip.

referenceany

Reference of the tooltip to align to.

placementPlacement

floating-ui placement.

'top'
enterDelaynumber

Delay before showing tooltip.

0
leaveDelaynumber

Delay before closing tooltip.

200
modifiersModifiers

floating-ui modifiers.

visibleboolean

External setter for visibility.

false
classNamestring

Additional CSS classnames.

triggerClassNamestring

CSS Classname for the tooltip container ( ie. the thing that the tooltip is bound to ).

triggerTriggerTypes | TriggerTypes[]

How the tooltip will be triggered.

'hover'
disabledboolean

Whether the tooltip is disabled.

false
animatedboolean

Deprecated: Use animation configuration instead. Whether the tooltip is animated.

true
animationMotionNodeAnimationOptions

Animation configuration for the tooltip.

followCursorboolean

Whether the tooltip should move with the cursor or not.

false
pointerEventsstring

Add pointer events or not. Usually not for tooltips.

'none'
arrowReactNode

Arrow pointing from the tooltip to the trigger element. Pass true to render the default arrow, or a ReactNode to render a custom arrow.

isPopoverboolean

Differentiator for popovers to be handled separate from tooltips

onOpen() => void

Tooltip was opened.

onClose() => void

Tooltip was closed.

Last updated on