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. |
children | ReactNode | - | |
className | ClassNameOrFunction<TooltipRenderProps> | 'react-aria-Tooltip' | 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. |
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 | - | |
hidden | boolean | - | |
inert | boolean | - | |
isEntering | boolean | - | Whether the tooltip is currently performing an entry animation. |
isExiting | boolean | - | Whether the tooltip is currently performing an exit animation. |
isOpen | boolean | - | Whether the element is rendered. |
lang | string | - | |
offset | number | 0 | The additional offset applied along the main axis between the element and its
anchor element. |
placement | Placement | 'top' | The placement of the tooltip with respect to the trigger. |
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. |
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. |
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" | - | |
triggerRef | RefObject<Element> | - | The ref for the element which the tooltip positions itself with respect to.
When used within a TooltipTrigger this is set automatically. It is only required when used
standalone. |