Components
Tooltip
A tooltip rendered outside its trigger, shown at once on hover or keyboard focus.
bunx shadcn@latest add @nalarx/tooltipUsage
Use it when the trigger sits inside a container that clips (a modal body, a scrolling list). Elsewhere, a button's tip prop is cheaper.
<Tooltip label="Edit tables">
<Button size="xs" aria-label="Edit tables">…</Button>
</Tooltip>Props
| Prop | Type | Default | |
|---|---|---|---|
label | string | Empty renders the children alone. | |
side | "top" | "bottom" | "left" | "right" | "top" | Flips when there is no room. |
align | "center" | "end" | "center" | |
className | string | On the inline wrapper. |
Accessibility
Keep the trigger focusable. The tooltip text is not announced, so the trigger's accessible name should say the same thing.
Replaces
Tip (web) and the unused base/Tooltip.tsx.