Dot Tooltip
It behaves the way a good one should: a pause before the first opens and none as you move along a row of them, open on keyboard focus but not on a click, still there when you move the pointer onto it, gone with Escape. It flips to the other side and slides along to stay on screen, and it describes its trigger to screen readers.
Needs: None. The popover API and a CSS mask.
Customize
side
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| content | ReactNode | required | What it says. Keep it short. |
| children | ReactElement | required | The trigger: one focusable element. |
| side | "top" | "bottom" | "top" | The side it prefers; it flips when there's no room. |
| shortcut | string | – | A keyboard shortcut after the words, e.g. ⌘C. |
| delay | number | 500 | Pause before the first opens, ms. |
| disabled | boolean | false | Never opens. |
| className | string | – | Class on the tooltip. |
| style | CSSProperties | – | Style on the tooltip. |