Skip to content
Components

Tooltip

Tiny CSS-only tooltips on hover and focus. Set the label via `data-tooltip`.

html
<button class="b-btn b-btn-secondary b-tooltip" data-tooltip="Save changes">Save</button>

Notes

  • Tooltips use CSS only — they show on :hover and :focus-visible
  • Always pair an icon-only button with aria-label for screen readers
  • Tooltips are not focusable themselves; they shouldn't carry information that's only available via hover

API

AttributeEffect
class="b-tooltip"Wraps the trigger element
data-tooltip="text"The tooltip content
Edit this page