Tooltip
Hover/focus tooltip with aria-describedby association and Escape dismissal.
npx @slipstream-ui/cli@latest add tooltipSides
Delays & real uses
Hover/focus me
Inverse bubble
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| content | string | — | The tooltip text. |
| side | 'top' | 'bottom' | 'left' | 'right' | 'top' | Placement relative to the trigger. |
| delay | number | 300 | Delay before showing on hover, in ms. Use 0 for instant hints. |
| variant | 'default' | 'inverse' | 'default' | Bubble palette; inverse is dark in light mode and light in dark mode. |
| children | ReactElement | — | Exactly one trigger element (button, input, icon…). |
Accessibility
- aria-describedby is injected into the trigger so the hint is announced with focus.
- Escape dismisses the tooltip without moving focus.
- The tooltip also shows on keyboard focus — never hide essential information in hover-only UI.
- Tooltips are supplementary: keep the trigger itself labeled (aria-label or visible text).
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+ — macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA — the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.