Design system/Components
Floating help
A tooltip is a short charcoal label that appears under the pointer after a brief pause. Since fingers can't hover, it's never the only carrier of information.
In codeapp/globals.css (.tooltip-wrap)
Live example
Hold the pointer over a button.
Size and timing
Text
11px / 600 · var(--dark-contrast)Background
var(--dark) · r 9px · padding 6px 11pxPosition
Below · 9px gap · end edgeEnter delay
0.25sExit with no delayMotion
opacity + translateY(-4px) scale(0.95) · 0.2sLayer
z 80Do
The name of an icon button or a short extra explanation.
Don't
Instructions, or the only place an important value appears.
Do
The same text in the button's aria-label.
Don't
A tooltip that screen readers don't read.
<span className="tooltip-wrap" data-tip={tr("پین کردن")}>
<button className="icon-btn" aria-label={tr("پین کردن")}><Icon d={paths.pin} size={14} /></button>
</span>Related pages