nalarx-ui
Components

Tooltip

A tooltip rendered outside its trigger, shown at once on hover or keyboard focus.

bunx shadcn@latest add @nalarx/tooltip

Usage

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

PropTypeDefault
labelstringEmpty renders the children alone.
side"top" | "bottom" | "left" | "right""top"Flips when there is no room.
align"center" | "end""center"
classNamestringOn 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.

On this page