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.
Considerations
Tooltips rely on the third party library Floating UI (previously PopperJS) for positioning.
Tooltips are opt-in for performance reasons, so you must initialize them yourself.
Usage
For using the Tooltip, you don't necessarily need a specific twig template, you just need to trigger the tooltip on any element that has data-bs-toggle="tooltip
and and associated data-bs-title="Default tooltip"
.
Taken from the Bootstrap Tooltip component page example, you can trigger the Tooltip on a link with a markup like below:
and then trigger it with the following javascript init, note that this file already exists in _bootstrap.js
, uncomment if not needed:
Last updated