Tooltip
A simple text popup tip.
#
When To Use- The tip is shown on mouse enter, and is hidden on mouse leave. The Tooltip doesn't support complex text or operations.
- To provide an explanation of a
button/text/operation
. It's often used instead of the htmltitle
attribute.
#
Examples#
Basic#
Position#
Use mouseEnterDelay and mouseLeaveDelay#
Controlled usage#
With defaultVisible#
APIProperty | Description | Type | Default |
---|---|---|---|
defaultVisible | Whether the floating tooltip card is visible by default | boolean | |
visible | Whether the floating tooltip card is visible | boolean | |
onVisibleChange | Callback executed when visibility of the tooltip card is changed | (visible: boolean) => void | |
position | The position base on the children component | Positions | Position.TOP |
mouseEnterDelay | Delay in milliseconds, before tooltip is shown on mouse enter | number | 0 |
mouseLeaveDelay | Delay in milliseconds, before tooltip is hidden on mouse leave | number | 200 |
content | A string or react component inside this tooltip. If you are using click to trigger, it can be a function that with hide callback as first argument | ReactNode | (handleClose: () => void) => ReactNode | |
onOpenComplete | Whether to mount child components on onClose | () => void | |
onCloseComplete | Whether to unmount child components on onClose | () => void | |
Wrapper | The wrapper of tooltip content | ComponentType |