Tooltip
Display a brief helper text to your user
Examples
Base
Show code
Position
Show code
Variants
Show code
Multiline
Show code
Slot
Show code
Toggle
Show code
Class props
Tooltip component
Display a brief helper text to your user
html
<o-tooltip></o-tooltip>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
active | Whether tooltip is active or not, use v-model:active to make it two-way binding | boolean | - | false |
always | Tooltip will be always active | boolean | - | false |
animation | Tooltip default animation | string | - | From config: tooltip: { |
closeable | Tooltip auto close options (pressing escape, clicking the content or outside) | string[] | boolean | true , false , content , outside , escape | From config: tooltip: { |
delay | Tooltip delay before it appears (number in ms) | number | - | |
disabled | Tooltip will be disabled | boolean | - | false |
label | Tooltip text, unnecessary when content slot is used | string | - | |
multiline | Tooltip will be multilined | boolean | - | false |
override | Override existing theme classes completely | boolean | - | |
position | Position of the Tooltip relative to the trigger | string | auto , top , bottom , left , right , top-right , top-left , bottom-left , bottom-right | From config: tooltip: { |
teleport | Append the component to another part of the DOM. Set true to append the component to the body.In addition, any CSS selector string or an actual DOM node can be used. | boolean|string|object | - | From config: dropdown: { |
triggerTag | Tooltip trigger tag name | DynamicComponent | - | From config: tooltip: { |
triggers | Tooltip trigger events | string[] | hover , click , focus , contextmenu | From config: tooltip: { |
variant | Color of the tooltip | string | primary , info , success , warning , danger , and any other custom color | From config: tooltip: { |
Events
Event name | Properties | Description |
---|---|---|
update:active | value boolean - updated active prop | active prop two-way binding |
close | on active change to false event | |
open | on active change to true event |
Slots
Name | Description | Bindings |
---|---|---|
content | Tooltip content, default is label prop | |
default | Tooltip trigger slot | active boolean - tooltip active state |
Sass variables
Current theme ➜ Oruga Base
SASS Variable | Default |
---|---|
$tooltip-arrow-margin | 2px |
$tooltip-arrow-size | 5px |
$tooltip-background-color | $primary |
$tooltip-color | $primary-invert |
$tooltip-content-box-shadow | 0px 1px 2px 1px rgba(0, 1, 0, 0.2) |
$tooltip-content-font-size | 0.85rem |
$tooltip-content-max-width | 300px |
$tooltip-content-multiline-width | 300px |
$tooltip-content-padding | 0.35rem 0.75rem |
$tooltip-content-radius-large | 6px |
$tooltip-content-weight-normal | 400 |
$tooltip-content-zindex | 38 |
See ➜ 📄 Full scss file
Current theme ➜ Oruga Full
SASS Variable | Default |
---|---|
$tooltip-arrow-margin | 2px |
$tooltip-arrow-size | 5px |
$tooltip-background-color | $primary |
$tooltip-color | $primary-invert |
$tooltip-content-box-shadow | 0px 1px 2px 1px rgba(0, 1, 0, 0.2) |
$tooltip-content-font-size | 0.85rem |
$tooltip-content-max-width | 300px |
$tooltip-content-multiline-width | 300px |
$tooltip-content-padding | 0.35rem 0.75rem |
$tooltip-content-radius-large | 6px |
$tooltip-content-weight-normal | 400 |
$tooltip-content-zindex | 38 |
See ➜ 📄 Full scss file
Current theme ➜ Bulma
The theme does not have any custom variables for this component.
Current theme ➜ Bootstrap
SASS Variable | Default |
---|---|
$tooltip-arrow-spacer | 2px |
$tooltip-content-multiline-width | 50vw |
$tooltip-shadow | $box-shadow-sm |
$tooltip-zindex | $zindex-tooltip |
See ➜ 📄 Full scss file