Tooltip
A popup that appears when an element is hovered or focused, showing a hint for sighted users.
Features
- Opens on hover and focus
- Closes on pointer down or Escape key press
- Supports custom open and close delays
- Supports custom positioning with placement options
- Automatically adjusts position to stay in viewport
Installation
typo3 ui:add tooltip
Please copy the files manually from GitHub into your project.
Read more about installing Components and Primitives.
Examples
Custom Positioning
Control where the tooltip appears relative to the trigger.
Open Delay
Set a custom delay before the tooltip opens.
Close Delay
Set a custom delay before the tooltip closes after the pointer leaves.
Disabled Interaction
Prevent the tooltip from opening on hover.
On Icon Buttons
Common pattern for icon-only buttons that need accessible labels.
Anatomy
<primitives:tooltip.root>
<primitives:tooltip.trigger />
<primitives:tooltip.positioner>
<primitives:tooltip.content>
<primitives:tooltip.arrow />
</primitives:tooltip.content>
</primitives:tooltip.positioner>
</primitives:tooltip.root>