The Tooltip component provides contextual information when users hover over or focus on an element. Perfect for explaining icons, showing keyboard shortcuts, or providing additional context without cluttering the interface.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/livewire/flux/llms.txt
Use this file to discover all available pages before exploring further.
Basic Usage
Using Button Tooltip Shorthand
Buttons have built-in tooltip support:Positioning
Control where the tooltip appears:- Top (Default)
- Bottom
- Left
- Right
Alignment
Control how the tooltip aligns relative to the trigger:With Keyboard Shortcuts
Display keyboard shortcuts within tooltips:Custom Content
Use slots for rich tooltip content:Interactive Tooltips
Allow users to interact with tooltip content:Toggleable Tooltips
Create click-to-open tooltips:With Livewire
Control tooltip state with Livewire:Icon Tooltips
Provide context for icon-only buttons:Form Field Hints
Provide additional context for form fields:Disabled Elements
Tooltips can wrap disabled elements:Props Reference
| Prop | Type | Default | Description |
|---|---|---|---|
content | string | - | Tooltip text content |
position | string | top | Tooltip position: top, bottom, left, right |
align | string | center | Tooltip alignment: start, center, end |
kbd | string | - | Keyboard shortcut to display |
interactive | boolean | false | Allow interaction with tooltip content |
toggleable | boolean | false | Open on click instead of hover |
wire:model | string | - | Livewire property for controlling state |
Accessibility
- Tooltips are triggered on both hover and focus
- Keyboard users can access tooltips when focusing interactive elements
- Tooltips automatically dismiss when focus is lost or mouse leaves
- Use
aria-labelon the trigger element for screen reader users - Interactive tooltips remain open when focused
Best Practices
- Keep It Brief: Tooltips should contain concise, helpful information
- Don’t Hide Critical Info: Never put essential information only in tooltips
- Be Consistent: Use consistent positioning throughout your app
- Mobile Consideration: Tooltips don’t work well on touch devices
- Timing: Avoid tooltips on elements with click actions (use toggleable instead)
Related Components
- Dropdown - For interactive menus
- Callout - For inline contextual messages
- Modal - For more complex overlays
The Tooltip component uses
<ui-tooltip> internally and automatically adds the .self modifier to wire:model for optimal performance.