Tooltip component which displays information when the tooltip icon is hovered over or in focus. Typically, tooltips are used to provide supporting information for other components such as inputs.
A use case may be an input with an acronym or jargon in the label, where the tooltip then explains what it means. Another could be clarification on why the business requires the information the user is providing.
A list of modifiers for the tooltip component, allowing you to change its appearance to fit a variety of roles and scenarios.
Modifiers can typically be combined to achieve the desired appearance, unless stated otherwise.
Makes the tooltip icon a little smaller.
We can add the invert modifier if the tooltip needs to be used on darker backgrounds.
Makes the tooltip appear from the left outwards of the icon.
Responsive classes available.
Makes the tooltip appear from the right outwards of the icon.
Responsive classes available.
Makes the tooltip appear from the center outwards of the icon.
Responsive classes available.
Allows you to place tooltips in the middle of text. Currently only supports tooltips with the c-tooltip--small
modifier.
Hello, this is a test paragraph, and this is a test tooltip
embedded in the middle of it.Any tooltip with this modifier can only be activated via a click, rather than hover or focus.
This component has methods which allow you to programatically trigger actions. You can trigger these using the evo()
selector.
See JavaScript API for more information and a list of shared, global methods.
Opens tooltip
evo('.js-my-tooltip').tooltip('open');
Closes tooltip
evo('.js-my-tooltip').tooltip('close');
Toggles tooltip between open/closed
evo('.js-my-tooltip').tooltip('toggle');
You can theme the tooltip component to make it fit your brand. For more information on theming EvoToolkit, please see Configuring EvoToolkit.
Below is a list of theme variables and their default values.
Theme Variables | Default |
---|---|
$component-tooltip-icon-color |
primary |