Elements

Components

Popover

Popover, dressed in the paper-and-ink system: a paper vessel that dissolves in on elevation, anchored to its trigger by a whisker arrow. The parts — Root, Trigger, Anchor, Indicator, Positioner, Content, Title, Description, CloseTrigger, Arrow, ArrowTip.

#Basic usage

popover/basic Vue React

#Props

#Anchor

A styled part — no props of its own; it takes the anatomy's shared styling.

#ArrowTip

A styled part — no props of its own; it takes the anatomy's shared styling.

#Arrow

A styled part — no props of its own; it takes the anatomy's shared styling.

#CloseTrigger

A styled part — no props of its own; it takes the anatomy's shared styling.

#Content

A styled part — no props of its own; it takes the anatomy's shared styling.

#Description

A styled part — no props of its own; it takes the anatomy's shared styling.

#Indicator

A styled part — no props of its own; it takes the anatomy's shared styling.

#Positioner

A styled part — no props of its own; it takes the anatomy's shared styling.

#Root

PropTypeDefaultDescription
autoFocusbooleantrueWhether to automatically set focus on the first focusable content within the popover when opened.
closeOnEscapebooleantrueWhether to close the popover when the escape key is pressed.
closeOnInteractOutsidebooleantrueWhether to close the popover when the user clicks outside of the popover.
defaultOpenbooleanThe initial open state of the popover when rendered. Use when you don't need to control the open state of the popover.
defaultTriggerValuestring | nullThe initial trigger value when rendered. Use when you don't need to control the trigger value.
finalFocusEl() => HTMLElement | nullElement to receive focus when the popover is closed
idstringThe unique identifier of the machine.
idsPartial<{ anchor: string; trigger: string; content: string; title: string; description: string; closeTrigger: string; positioner: string; arrow: string; }>The ids of the elements in the popover. Useful for composition.
initialFocusEl() => HTMLElement | nullThe element to focus on when the popover is opened.
modalbooleanfalseWhether the popover should be modal. When set to true: - interaction with outside elements will be disabled - only popover content will be visible to screen readers - scrolling is blocked - focus is trapped within the popover
openbooleanThe controlled open state of the popover
persistentElements(() => Element | null)[]Returns the persistent elements that: - should not have pointer-events disabled - should not trigger the dismiss event
portalledbooleantrueWhether the popover is portalled. This will proxy the tabbing behavior regardless of the DOM position of the popover content.
positioningpopover.PositioningOptionsThe user provided options used to position the popover content
restoreFocusbooleantrueWhether to restore focus to the element that had focus before the popover was opened
translationspopover.IntlTranslationsSpecifies the localized strings that identifies the accessibility elements and their states
triggerValuestring | nullThe value of the trigger that currently open the popover

#Title

A styled part — no props of its own; it takes the anatomy's shared styling.

#Trigger

PropTypeDefaultDescription
valuestring | undefinedThe value that identifies this specific trigger