Drop-in tooltips with the help of tippy.js
import { RailsuiTooltip } from 'railsui-stimulus'
application.register('railsui-tooltip', RailsuiTooltip)
<button
data-controller="railsui-tooltip"
data-railsui-tooltip-content-value="Hi, from the tips of tools"
class="underline"
>
Hover here
</button>
<button
data-controller="railsui-tooltip"
data-railsui-tooltip-content-value="We raised over $1 billion to engineer the greatest tooltip of our lives. <strong>What's super cool</strong> is that HTML can be embedded into the tooltip for max emphasis."
data-railsui-tooltip-allow-html-value="true"
class="underline"
>
and here
</button>
content
- The content of the tooltip is placed here.allowHTML
- Allow HTML elements within the tooltip content. default:false