![]() |
VOOZH | about |
Spectre Tooltips are quite useful for showing the description of different elements in the webpage. Tooltip can be invoked on any element in a webpage. It provide context information labels that appear on hover and focus. Tooltips component is built entirely in CSS.
To create a tooltip you need to add the tooltip class and the data-tooltip attribute, which contains the tooltip content. And by using tooltip-right, tooltip-bottom or tooltip-left class you can define the position of a tooltip. By default, the tooltip appears above the element.
Spectre tooltips:
Spectre tooltips Class:
Syntax:
<button class="btn tooltip" data-tooltip="..."> ... </button>
Example: Below example illustrate the Spectre tooltips. In this example, we will create 4 buttons and each side of the tooltips will be used in that button.
Output:
Reference: https://picturepan2.github.io/spectre/components/tooltips.html#tooltips