Tooltip is a user interface element that displays a small hint box when the user hovers over an element, providing additional information or instructions. Tooltips are commonly used to help users understand certain elements or features in the interface.
import { Tooltip } from "wis/tooltip"
API Reference#
Name | Type | Default | Description |
---|---|---|---|
side | top right left bottom | top | The preferred side of the trigger to render against when open. May change when collisions occur. |
align | start center end | center | The preferred alignment against the trigger. May change when collisions occur. |
text | string | none | The content text to render in the tooltip. |
open | boolean | none | The controlled open state of the tooltip. Must be used in conjunction with onOpen |
defaultOpen | boolean | none | The open state of the tooltip when it is initially rendered. |
onOpen | (open: boolean) => void | none | Event handler called when the tooltip is open state change. |