Component
Tooltip
Add concise supporting context to a focusable control without replacing its accessible name.
Interactive preview
Usage
Import the component entry and start with its smallest complete example.
Import
import { Tooltip } from "@chitrank2050/monoline-ui/tooltip"Basic usage
<Tooltip.Provider>
<Tooltip>
<Tooltip.Trigger asChild><Button>Copy</Button></Tooltip.Trigger>
<Tooltip.Content side="top">Copy install command</Tooltip.Content>
</Tooltip>
</Tooltip.Provider>Usage guidance
Choose the component for its interaction model and semantics before customizing its appearance.
Tooltip adds a short explanation to a focusable control when the interface cannot show that supporting context persistently.
The text is essential, interactive, lengthy, or being used instead of a control's accessible name.
Tooltip opens for pointer and keyboard focus and closes on Escape. The trigger must remain focusable and understandable without relying on the tooltip alone.
This component needs browser JavaScript for state or browser APIs.
API reference
Props, slots, and callbacks available on this component.
Design tokens
Theme variables this component reads for color, spacing, and motion.
Implementation
The source used by the example above, including any state it needs.
<Tooltip.Provider>
<Tooltip>
<Tooltip.Trigger asChild><Button>Copy</Button></Tooltip.Trigger>
<Tooltip.Content side="top">Copy install command</Tooltip.Content>
</Tooltip>
</Tooltip.Provider>Related documentation
Compare related components or review the package and theme setup.