A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
Installation
CLI
Install the component using the StarUI CLI:
star add tooltipExamples
Tooltip Positions
Tooltips can be positioned on any side of the trigger element
Tooltip Alignment
Control tooltip alignment relative to the trigger
Custom Delays
Configure show and hide delays for different UX patterns
Icon Buttons
Tooltips provide context for icon-only buttons
Form Field Helper
Add helpful information to form inputs
Rich Content
Tooltips with formatted text, icons, and custom styling
Keyboard Navigation
Tooltips are fully accessible via keyboard with focus triggers and Escape to close
Tab through these elements and press Escape to close tooltips:
Dynamic Content
Tooltip content that updates based on application state
Custom Styling
Apply custom themes and styles to tooltips
Truncated Text
Show full content when text is truncated
Hover over truncated text:
This is a very long text that will be truncated with an ellipsis to demonstrate the tooltip pattern for showing full content when text overflows its container
Avatar Group
Add member names to avatar groups
Team members:
API Reference
| Component | Description |
|---|---|
Tooltip |
Main container component that manages tooltip state |
TooltipTrigger |
Element that triggers tooltip display on hover/focus |
TooltipContent |
The actual tooltip content with positioning and styling |
TooltipProvider |
Optional provider for tooltip configuration (currently unused) |