TooltipProvider
Provides a tooltip store to Tooltip components.
Code examples
Optional Props
defaultOpen
boolean | undefined = false
Whether the content should be visible by default.
disclosure
DisclosureStore | null | undefined
A reference to another disclosure store that controls another disclosure
component to keep them in sync. Element states like contentElement and
disclosureElement won't be synced. For that, use the
store prop
instead.
Live examples




hideTimeout
number | undefined = 0
The amount of time in milliseconds to wait before hiding the popup. It
defaults to the value passed to
timeout.
Live examples
open
boolean = false
Whether the content is visible.
Live examples




placement
Placement = "top"
The placement of the popover.
Live examples


popover
PopoverStore | null | undefined
A reference to another popover store that's controlling another popover to keep them in sync.
setMounted
((mounted: boolean) => void) | undefined
A callback that gets called when the mounted state changes.
Code examples
const [mounted, setMounted] = useState(false);
setOpen
((open: boolean) => void) | undefined
A callback that gets called when the
open state
changes.
Code examples
const [open, setOpen] = useState(false);
showTimeout
number | undefined
The amount of time in milliseconds to wait before showing the popup. It
defaults to the value passed to
timeout.
Live examples


skipTimeout
number = 300
The amount of time after a tooltip is hidden while all tooltips on the page can be shown immediately, without waiting for the show timeout.
store
Store<Partial<S>> | undefined
Another store object that will be kept in sync with the original store.
Live examples
timeout
number = 500
The amount of time in milliseconds to wait before showing and hiding the
popup. To control the delay for showing and hiding separately, use
showTimeout
and
hideTimeout.
animated
animatednumber | boolean | undefined
Deprecated: Manually setting the animated prop is no longer necessary.
This will be removed in a future release.
Determines whether the content should animate when it is shown or hidden.
If
true, theanimatingstate will betruewhen the content is shown or hidden and it will wait for a CSS animation/transition to end before becomingfalse.If it's set to a number, the
animatingstate will betruewhen the content is shown or hidden and it will wait for the number of milliseconds to pass before becomingfalse.
type
type"label" | "description" = "description"
Deprecated: Render a visually hidden label or use the aria-label or
aria-labelledby attributes on the anchor element instead.
Determines whether the tooltip is being used as a label or a description for the anchor element.