Ariakit
/

Tooltip

Display visual information related to an anchor element when the element receives keyboard focus or the mouse hovers over it.

Tooltip
import * as Ariakit from "@ariakit/react";
import "./style.css";
export default function Example() {
return (
className="link"
render={<a href="https://ariakit.org/components/tooltip" />}
>
Tooltip
<Ariakit.Tooltip className="tooltip">
https://ariakit.org/components/tooltip
);
}

Examples

API

Tooltip anchors must have accessible names

By default, tooltips serve as non-critical visual descriptions and shouldn't be used as accessible labels for the anchor element. You must ensure the anchor element has an accessible name, either by:

Moreover, the TooltipAnchor component should be rendered as an accessible widget through composition, like a button or a link, so it's properly announced by screen readers when it gains focus.

Stay tuned

Join 1,000+ subscribers and receive monthly tips & updates on new Ariakit content.

No spam. Unsubscribe anytime. Read latest issue