Tooltip

A popup that displays information related to an element when the mouse hovers over it.

Usage

Add data-tooltip to the trigger element. Use data-side and data-align to change the position.

Basecoat tooltips are CSS-only and text-only. This intentionally differs from shadcn/ui's composed tooltip content, which can render arbitrary markup and uses a portal.

<button class="btn-outline" data-tooltip="Tooltip text" data-side="bottom" data-align="center">Bottom</button>
data-tooltip
Tooltip text.
data-side Optional
top, bottom, left, right, inline-start, or inline-end. Defaults to top.
data-align Optional
start, center, or end. Defaults to center.

Examples

Default

Sides

Icon Button

Disabled Button

RTL