Tooltip
A short label shown on hover and focus.
MarkdownExamples
Basic
BoldItalicUnderline
API
| Prop | Type | Default |
|---|---|---|
textTooltip text. Without it, only the trigger renders. | string | — |
delayMilliseconds of hover or focus before it shows. | number | 250 |
| Slot | Props |
|---|---|
defaultThe trigger. Bind | { attrs: { "aria-describedby"?: string | undefined; }; } |
Styling
For an arrow: data-tooltip-side is top or bottom after flipping, and --ui-tooltip-arrow-x is the trigger's centre from the tooltip's left edge.
- Parts
tooltip-roottooltip- States
data-tooltip-side
Keyboard
| Keys | Action |
|---|---|
Escape | Hide without moving focus, leaving a surrounding dialog open |
Accessibility
- Bind the slot's
attrsto the trigger, which it then describes.