UNSTABLE_portalContainer | Element | document.body | The container element in which the overlay portal will be placed. This may have unknown
behavior depending on where it is portalled to.
@deprecated - Use a parent UNSAFE_PortalProvider to set your portal container instead. |
arrowBoundaryOffset | number | 0 | The minimum distance the arrow's edge should be from the edge of the overlay element. |
arrowRef | RefObject<Element> | - | A ref for the popover arrow element. |
boundaryElement | Element | document.body | Element that that serves as the positioning boundary. |
children | ReactNode | - | |
className | ClassNameOrFunction<PopoverRenderProps> | 'react-aria-Popover' | The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the
element. A function may be provided to compute the class based on component state. |
containerPadding | number | 12 | The placement padding that should be applied between the element and its
surrounding container. |
controller | OverlayController | - | An overlay controller to control the popover state. |
crossOffset | number | 0 | The additional offset applied along the cross axis between the element and its
anchor element. |
defaultOpen | boolean | - | Whether the overlay is open by default (uncontrolled). |
dir | string | - | |
getTargetRect | ((target: Element) => DOMRect) | target.getBoundingClientRect() | Overrides the target element's bounding rectangle. Useful for positioning relative to
a specific point such as the mouse cursor (e.g. context menus) or text selection.
@param target - The target element. |
hidden | boolean | - | |
inert | boolean | - | |
isDialogContent | boolean | - | Whether the popover contains a dialog. |
isEntering | boolean | - | Whether the popover is currently performing an entry animation. |
isExiting | boolean | - | Whether the popover is currently performing an exit animation. |
isKeyboardDismissDisabled | boolean | false | Whether pressing the escape key to close the popover should be disabled.
Most popovers should not use this option. When set to true, an alternative
way to close the popover with a keyboard must be provided. |
isNonModal | boolean | - | Whether the popover is non-modal, i.e. elements outside the popover may be
interacted with by assistive technologies.
Most popovers should not use this option as it may negatively impact the screen
reader experience. Only use with components such as combobox, which are designed
to handle this situation carefully. |
isOpen | boolean | - | Whether the overlay is open by default (controlled). |
lang | string | - | |
maxHeight | number | - | The maxHeight specified for the overlay element.
By default, it will take all space up to the current viewport height. |
offset | number | 8 | The additional offset applied along the main axis between the element and its
anchor element. |
placement | Placement | 'bottom' | The placement of the element with respect to its anchor element. |
render | DOMRenderFunction<"div", TooltipRenderProps> | - | Overrides the default DOM element with a custom render function.
This allows rendering existing components with built-in styles and behaviors
such as router links, animation libraries, and pre-styled components.
Requirements:
- You must render the expected element type (e.g. if `<button>` is expected, you cannot render an
`<a>`).
- Only a single root DOM element can be rendered (no fragments).
- You must pass through props and ref to the underlying DOM element, merging with your own prop
as appropriate. |
scrollRef | RefObject<Element> | overlayRef | A ref for the scrollable region within the overlay. |
shouldCloseOnInteractOutside | ((element: Element) => boolean) | - | When user interacts with the argument element outside of the popover ref,
return true if onClose should be called. This gives you a chance to filter
out interaction with elements that should not dismiss the popover.
By default, onClose will always be called on interaction outside the popover ref. |
shouldFlip | boolean | true | Whether the element should flip its orientation (e.g. top to bottom or left to right) when
there is insufficient room for it to render completely. |
shouldUpdatePosition | boolean | true | Whether the overlay should update its position automatically. |
slot | string | - | A slot name for the component. Slots allow the component to receive props from a parent
component. An explicit `null` value indicates that the local props completely override all
props received from a parent. |
style | StyleOrFunction<TooltipRenderProps> | - | The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the
element. A function may be provided to compute the style based on component state. |
translate | "yes" | "no" | - | |
trigger | string | - | The name of the component that triggered the popover. This is reflected on the element
as the `data-trigger` attribute, and can be used to provide specific
styles for the popover depending on which element triggered it. |
triggerRef | RefObject<Element> | - | The ref for the element which the popover positions itself with respect to.
When used within a trigger component such as DialogTrigger, MenuTrigger, Select, etc.,
this is set automatically. It is only required when used standalone. |
width | string | number | - | A fixed width for the popover. |
wrapWith | ReactElement<unknown, string | JSXElementConstructor<any>> | - | A React element the component is wrapped with. The element is cloned and
receives the component as its only child — useful to render the component
inside a link, a tooltip trigger or any other wrapper without changing the
surrounding markup. |