Skip to Content

Popover

Non-modal interactive popover. Give the dialog an aria-label/aria-labelledby. Escape/outside interaction closes it; focus returns according to the user’s interaction. Nested layers share a tree and dismiss one layer at a time.

Использование

Позиционирование

API

ПропТипПо умолчаниюОписание
trigger*ReactElement<any, string | JSXElementConstructor<any>>—One interactive element that forwards props and ref to its DOM node.
placement"top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | "left-top" | "left-center" | "left-bottom" | "right-top" | "right-center" | "right-bottom"bottom-centerPreferred placement; collisions may change the resolved side.
openboolean——
defaultOpenbooleanInitial uncontrolled visibility.
onOpen() => void——
onClose() => void——
widthWidth<string | number>240Width constrained by the viewport and 240–560px design bounds.
initialFocusnumber | RefObject<HTMLElement | null>0First tabbable by default, or a custom focus target/ref.
Last updated on