Skip to main content

Content

Setting the ReactTooltip content.

Using data-tooltip-content anchor element attribute

import { Tooltip } from 'react-tooltip';

<a
data-tooltip-id="my-tooltip"
data-tooltip-content="Hello world!"
>
◕‿‿◕
</a>
<Tooltip id="my-tooltip" />
◕‿‿◕

Using content tooltip prop

import { Tooltip } from 'react-tooltip';

<a id="my-anchor-element">◕‿‿◕</a>
<Tooltip
anchorSelect="#my-anchor-element"
content="Hello world!"
/>
◕‿‿◕