Forge Developer

Beta

Forge Developer

Beta

Rate this page:

Tooltip

The Tooltip component can be wrapped around another component to display a tooltip when hovering over it.

Usage

1
import ForgeUI, { Tooltip } from '@forge/ui';

Props

NameTypeRequiredDescription
childrenForgeElementYesThe component to wrap the tooltip around.
textstringYesThe message to display in the tooltip.

Example

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>

Preview

Screenshot of what the rendered tooltip component should look like

Rate this page: