Skip to content

Tooltip

Short labels on hover and focus. Pure CSS; the text is a real element referenced by aria-describedby.

Placements

Add to library Opens in a new tab Copy to clipboard

Installation

Everything ships in one stylesheet. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">

Prefer to own the files? /r/tooltip.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-tooltipWrapper around the trigger and a role="tooltip" element.
mn-tooltip-bottom · mn-tooltip-left · mn-tooltip-rightPlacement (top is default).

Accessibility

  • Link the tooltip with aria-describedby so screen readers read it. Tooltips appear on keyboard focus, not only hover. Never put essential or interactive content in a tooltip.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page