Contextual help or information about specific components that appears on hover.
Alternatively, you can provide a ReactNode or ReactFragment as the message:
Use the placement prop to change the placement of the tooltip. When setting the placement to auto, or some variantion with auto, the preferredPlacement may be used to specify what the preffered automatic placement is.
Use the openSpeed prop to change the delay before showing the tooltip.
Use the keyboardShortcut prop to display a keyboard shortcut in the tooltip.
For a list of supported keys see Mousetrap.
Tooltip must have a single element as a child.
Use the isOpen prop to control the open state of the tooltip.
| Name | Default | Description |
|---|---|---|
isDisabled | false | booleanDisable the tooltip. |
isOpen | undefined | booleanOptionally control the open state of the tooltip. |
message | — | ReactNodeTooltip message. |
keyboardShortcut | — | stringThe keyboard shortcut to display in the tooltip. Use the `+` symbol to separate characters. |
placement | "top" | PlacementWithLogicalThe placement of the tooltip. |
preferredPlacements | — | PlacementWithLogical[]Preferred placements for the tooltip. If provided, the tooltip will try to use these placements first. This is useful when you want to restrict the tooltip to specific placements while still allowing it to flip to other placements if there's not enough space. |
children | — | ReactElement<RefAttributes<HTMLElement>>
| string
| number
| boolean
| undefinedElement to show tooltip around. |
openSpeed | "default" | "immediate" | "default"Show the tooltip with a delay. |