Skip to content

DocsDisplayTooltip

PT

Display

Tooltip

Short tip that shows on hover and focus, using just the data-tip attribute.

CSS only

Example

Installation

Tooltip ships in the full package, in unslop.css:

curl -fsSL unslop.leallabs.dev/i | sh

No build It's just CSS: with unslop.css on the page, the classes already work.

Classes and variants

ClassWhat it does
data-tip="texto"On any element: the text shows above it on hover and on keyboard focus.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
aria-labelon the elementdata-tip is visual and screen readers don't read it. Repeat the name in aria-label or in the text.

Keyboard

KeyDoes
Tabvisible focus shows the tip

Type to search. Arrows pick, Enter opens.