Tooltip
A short label for an element. It opens on hover and keyboard focus, waits a beat the first time and not between neighbours, and closes on Escape, leave and blur.
pixikit.com/docs/components/tooltip
Customize
Placement
Delay400ms
Offset8px
Portal
Disabled
Props
9| Name | Type | Default | Description |
|---|---|---|---|
content | string | Required | The text shown in the tooltip. |
children | ReactElement | Required | The one element the tooltip describes. It gets the hover and focus handlers and aria-describedby. |
placement | Placement | "top" | Where the tooltip sits around the element; it flips when there is no room. |
delay | number | 400 | Milliseconds to wait before showing on hover; no wait when another tooltip was open in the last 300ms. |
offset | number | 8 | Gap in px between the element and the tooltip. |
shortcut | string | None | A key hint shown after the text, such as `Ctrl K`. |
portal | boolean | true | Renders the tooltip in a portal on the page body; turn off to keep it inline. |
className | string | None | Extra classes for the tooltip. |
disabled | boolean | false | Turns the tooltip off; the element stays mounted and nothing shows. |