Tooltips
Documentation and examples for adding custom Bootstrap tooltips with CSS and JavaScript using CSS3 for animations and data-bs-attributes
for local title storage.
Examples
One way to initialize all tooltips on a page would be to select them by their data-bs-toggle
attribute:
Hover over the links below to see tooltips:
Placeholder text to demonstrate some inline links with tooltips. This is now just filler, no killer. Content placed here just to mimic the presence of real text. And all that just to give you an idea of how tooltips would look when used in real-world situations. So hopefully you've now seen how these tooltips on links can work in practice, once you use them on your own site or project.
Code Example gose Here
Custom tooltips
We set a custom class with data-bs-custom-class="custom-tooltip"
to scope our custom appearance and use it to override a local CSS variable.
<button type="button" class="btn btn-primary" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-custom-class="custom-tooltip" title="This top tooltip is themed via CSS variables."> Custom tooltip</button>
Directions
Hover over the buttons below to see the four tooltips directions: top, right, bottom, left
. Directions are mirrored when using Bootstrap in RTL.
Use these directions top, right, bottom, left
on data-bs-placement=""
for tooltip placement directions.
<button type="button" class="btn btn-primary" data-bs-toggle="tooltip" data-bs-placement="top" title="Tooltip on top"> Tooltip on top</button>