Tooltip
A short hint that appears on hover and keyboard focus.
- Use it for
- A short label for an icon or truncated text, on hover and focus.
- Not for
- Anything interactive or essential; touch users may never see it. Try Popover.
Tooltip preview
Hover or focus the button to read its supporting description.
Installation
npm install @stackunseen/uiimport { Tooltip } from '@stackunseen/ui';@stackunseen/ui/styles.cssParts
Short help text on hover and keyboard focus. Nothing inside it can be clicked; use Popover for that.
How the parts fit together
<Tooltip>
<Tooltip.Trigger asChild>
<Button variant="outline">Read-only preview</Button>
</Tooltip.Trigger>
<Tooltip.Content>Changes are kept in this local example.</Tooltip.Content>
</Tooltip>TooltipProviderOptional; shares the hover delay across tooltips.
TooltipHolds the open state.
Tooltip.TriggerThe control it describes. Pass your own with
asChild.Tooltip.ContentThe text.
Tooltip.ArrowAn optional pointer.
Usage and props
Keep important labels visible on the page. A tooltip is only extra help and can’t hold buttons or links.
Supported inputs
This is the public signature used by this example. Open Code to see how the values and callbacks fit together.
Root: open? · onOpenChange? · Provider: delayDuration? · Trigger/ContentAll props
Loading…
For your coding agent
Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.
- Contract
- Root: open? · onOpenChange? · Provider: delayDuration? · Trigger/Content
- Keeps honest
- Keep important labels visible on the page. A tooltip is only extra help and can’t hold buttons or links.
- MCP
read_component "Tooltip"on the docs endpoint
Keyboard and customization
Keyboard
Focusing the trigger reveals the hint; Escape dismisses it without moving focus.
Customization
Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio