Tooltip

The Tooltip component displays additional information when hovering over an element. It's commonly used to provide context or explanations for UI elements.

Plese note: components using popout (Tooltip, Dropdown & Popout) cannot be styled using scoped CSS in Vue SFC. However, you can just define a new <style> tag, style the popout inside and keep rest of your CSS scoped in a separate <style scoped>.

Source
Basic Usage
Different Placements
With Delay
With Icon
With Formatted Content

Props

NameDefaultType
placementtoptop right bottom left top-start top-end right-start right-end bottom-start bottom-end left-start left-end
Position of the dropdown relative to the trigger
enter-delay0number
The delay in milliseconds before showing the tooltip
leave-delay0number
The delay in milliseconds before hiding the tooltip after the cursor leaves
disabledfalseboolean
Controls whether the tooltip can render

Slots

NameAcceptsDescription
defaultanyThe element that triggers the tooltip
tooltipanyThe content of the tooltip

Tokens

CSS variable tokens used for global or per-instance manipulation of certain styling.

TokenDefaultDescription
--vui-tooltip-padding-blockvar(--space-xs)Vertical padding
--vui-tooltip-padding-inlinevar(--space-s)Horizontal padding
--vui-tooltip-max-width512pxMax tooltip width
--vui-tooltip-background-colorvar(--color-bg-raised)Background color
--vui-tooltip-font-sizevar(--font-size-m)Font size
--vui-tooltip-colorvar(--color-text)Text color