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.
OptionalshouldFlip
shouldFlip?:boolean
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.
Default
true
Optionalstyle
style?:StyleOrFunction<TooltipRenderProps>
The inline style for the
element. A function may be provided to compute the style based on component state.
OptionalsuppressHydrationWarning
suppressHydrationWarning?:boolean
A React-only flag that suppresses the warning React normally logs when an element's
server-rendered content doesn't match the client render during hydration. See React
docs.
Optionaltranslate
translate?:"yes"|"no"
OptionaltriggerRef
triggerRef?:RefObject<Element|null>
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.
OptionalUNSTABLE_portalContainer
UNSTABLE_portalContainer?:Element
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.
Identifies the element (or elements) that describes the object.