Saul HTML Pro customizes the Bootstrap Tooltips
through the SASS variables in src/sass/components/_variables.scss and custom SASS code in src/sass/components/_tooltips.scss. Bootstrap Tooltips are globally initialized by
src/js/components/app.js wrapper script via data attribute data-bs-toggle="tooltip".
.
Basic
Use data-bs-toggle="tooltip" HTML attribute to initialize a tooltip by passing any of available options as explained
in Tooltip Options.
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="top" title="Tooltip on top">
Tooltip on top
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="right" title="Tooltip on right">
Tooltip on right
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Tooltip on bottom">
Tooltip on bottom
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-placement="left" title="Tooltip on left">
Tooltip on left
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>">
Tooltip with HTML
</button>
Inverse
Use data-bs-custom-class="tooltip-inverse" HTML attribute to initialize a tooltip with inverse style.
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="Tooltip on top">
Tooltip on top
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="right" title="Tooltip on right">
Tooltip on right
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="bottom" title="Tooltip on bottom">
Tooltip on bottom
</button>
<button type="button" class="btn btn-secondary" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="left" title="Tooltip on left">
Tooltip on left
</button>
Dismiss Options
Use custom data-bs-dismiss="click" HTML attribute to dismiss a tooltip on click.