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-center | Preferred placement; collisions may change the resolved side. |
open | boolean | — | — |
defaultOpen | boolean | | Initial uncontrolled visibility. |
onOpen | () => void | — | — |
onClose | () => void | — | — |
width | Width<string | number> | 240 | Width constrained by the viewport and 240–560px design bounds. |
initialFocus | number | RefObject<HTMLElement | null> | 0 | First tabbable by default, or a custom focus target/ref. |
Last updated on