Rate this page:
The Tooltip
component can be wrapped around another component to display a tooltip when hovering over it.
1
import ForgeUI, { Tooltip } from '@forge/ui';
Name | Type | Required | Description |
---|---|---|---|
children | ForgeElement | Yes | The component to wrap the tooltip around. |
text | string | Yes | The message to display in the tooltip. |
A tooltip wrapping a button component. Hovering over the button will display the tooltip with Hello World
.
1 2 3 4 5 6
<Tooltip text="Hello World">
<Button
text="Hover over me"
onClick={() => console.log("Hello World")}
/>
</Tooltip>
Rate this page: