Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nuxt/ui/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Tooltip component displays helpful text hints when hovering over an element. Supports text, keyboard shortcuts, and custom positioning.Basic Usage
Props
The text content of the tooltip.
Array of keyboard keys to display in the tooltip.
Configuration object for tooltip positioning and behavior.
Display an arrow pointing to the trigger element.
Render the tooltip in a portal.
The reference element for positioning. If not provided, uses the trigger element.
Controls the open state of the tooltip (v-model:open).
The default open state when uncontrolled.
Delay in milliseconds before the tooltip appears.
Prevent the tooltip from staying open when hovering over its content.
Prevent the tooltip from closing when the trigger is activated.
Prevent the tooltip from opening on non-keyboard focus events.
Disable the tooltip. Automatically disabled when no text or kbds are provided.
CSS class for styling the trigger element.
Theme customization object for component slots.
Events
Emitted when the open state changes.
Slots
The trigger element that shows the tooltip on hover. Receives the current open state.
Custom content for the tooltip, replacing the default text and keyboard shortcuts.
Examples
With Keyboard Shortcuts
With Arrow
Different Positions
With Delay
Custom Content
Multiple Keyboard Shortcuts
On Icon Button
Disabled Tooltip
Content Props
Thecontent prop accepts the following positioning options:
side:'top' | 'right' | 'bottom' | 'left'- Which side to position the tooltipsideOffset:number- Distance in pixels from the triggeralign:'start' | 'center' | 'end'- Alignment along the sidealignOffset:number- Offset along the alignment axiscollisionPadding:number | Partial<Record<'top' | 'right' | 'bottom' | 'left', number>>- Padding from viewport edgesavoidCollisions:boolean- Whether to adjust position to avoid collisionssticky:'partial' | 'always'- Sticky behavior during scrolling
Accessibility
The Tooltip component automatically:- Disables when no content is provided
- Provides proper ARIA attributes
- Supports keyboard navigation
- Can be configured to ignore non-keyboard focus for better accessibility