Tooltip

A small bubble of explanatory text. The class paints the bubble and nothing else: a CSS-only tooltip anchors with a pseudo-element, and Kobalte positions a portaled Content with its popper.

alpha The class names and states here are stable. The look is not: these styles can change in a minor release, without a major version bump.

ClassDoes what
tooltip-contentThe bubble: inverted surface, small text
tooltip-arrowColour for Kobalte's arrow, which draws itself in currentColor

Basic

<button class="btn">Save</button>
<span class="tooltip-content" style="display: inline-block; margin-left: 0.5rem">Saves and closes</span>

The demo places the bubble inline so it is visible without a hover. In an app Kobalte's popper positions it, and data-expanded tells you when it is open if you want to animate it.