Tooltip

Markdown

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/ui
import { Tooltip } from '@stackunseen/ui';
Styles: @stackunseen/ui/styles.css

Parts

Short help text on hover and keyboard focus. Nothing inside it can be clicked; use Popover for that.

How the parts fit together

tsx
<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>
  1. TooltipProvider

    Optional; shares the hover delay across tooltips.

  2. Tooltip

    Holds the open state.

  3. Tooltip.Trigger

    The control it describes. Pass your own with asChild.

  4. Tooltip.Content

    The text.

    Propscontainer

  5. Tooltip.Arrow

    An 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/Content
How state and callbacks work
All 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
Open the Markdown file

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