Tooltip
Tooltip exposes the shared tooltip surface for plain and rich treatments, with control over the underlying popover behavior.
Default
Variants
Popover Types
Action Tooltips
Action components use title as the simple text tooltip entry point. The title is rendered with the library tooltip behavior and is not forwarded to the DOM, so native HTML tooltips do not appear.
Simple action titles use one shared, non-interactive tooltip surface. The surface and its anchor are created lazily when an action is first hovered, keyboard-focused, or long-pressed, so unopened actions do not allocate tooltip DOM or per-trigger event listeners. The shared surface follows the active action and is released when its action tree is unmounted.
<Button title="Save changes">Save</Button>
<IconButton icon="settings" title="Settings" />
<FloatingActionButton icon="edit" title="Compose" />This behavior is available on:
ButtonIconButtonFloatingActionButton
For icon-only actions, title is also used as the fallback accessible name when neither aria-label nor aria-labelledby is provided.
<IconButton icon="settings" title="Settings" />
<!-- Equivalent accessible name, but keeps a different tooltip string. -->
<IconButton icon="settings" aria-label="Open settings" title="Settings" />Use v-tooltip when you need rich or interactive content, a referenced tooltip surface, custom placement, or different interaction options. Authored rich surfaces keep their own DOM, focus, and interaction lifecycle rather than using the shared simple-title runtime.
<Button v-tooltip="'#save-tip'">Save</Button>
<Tooltip id="save-tip" variant="rich">
Save the current draft and keep editing.
</Tooltip>See v-tooltip for the full directive API.
Floating surface
See floating surface tokens for shared theme colors, borders, shadows, and an interactive example with nested menus and dialogs.
Reference
Anatomy
| Element | Part | Selector |
|---|---|---|
<div> | root | [data-scope="tooltip"][data-part="root"]LMBCopy |
Props
| Name | Description | Default | Control |
|---|---|---|---|
variantOptional | The variant of the tooltip. plainrich | "plain" | |
popoverOptional | The popover behavior of the tooltip. automanualhint | "hint" |
Slots1
| Name | Parameters | Description |
|---|---|---|
default | - | The default slot for the tooltip content. |
Styling43
| Token | Description |
|---|---|
--md-plain-tooltip-container-colorColorFallback var(--md-sys-color-inverse-surface) | Controls tooltip container color. |
--md-plain-tooltip-container-shapeShapeFallback var(--md-shape-compact) | Controls tooltip container shape. |
--md-plain-tooltip-supporting-text-colorColorFallback var(--md-sys-color-inverse-on-surface) | Controls tooltip supporting text color. |
--md-plain-tooltip-supporting-text-fontTypographyFallback var(--md-sys-typescale-body-small-font) | Controls tooltip supporting text font. |
--md-plain-tooltip-supporting-text-line-heightTypographyFallback var(--md-sys-typescale-body-small-line-height) | Controls tooltip supporting text line height. |
--md-plain-tooltip-supporting-text-sizeLayoutFallback var(--md-sys-typescale-body-small-size) | Controls tooltip supporting text size. |
--md-plain-tooltip-supporting-text-trackingTypographyFallback var(--md-sys-typescale-body-small-tracking) | Controls tooltip supporting text tracking. |
--md-plain-tooltip-supporting-text-typeTypographyFallback var(--md-sys-typescale-body-small) | Controls tooltip supporting text type. |
--md-plain-tooltip-supporting-text-weightTypographyFallback var(--md-sys-typescale-body-small-weight) | Controls tooltip supporting text weight. |
--md-rich-tooltip-action-focus-label-text-colorFocusFallback var(--md-sys-color-primary) | Controls tooltip action focus label text color. |
--md-rich-tooltip-action-focus-state-layer-colorFocusFallback var(--md-sys-color-primary) | Controls tooltip action focus state layer color. |
--md-rich-tooltip-action-focus-state-layer-opacityFocusFallback var(--md-sys-state-focus-state-layer-opacity) | Controls tooltip action focus state layer opacity. |
--md-rich-tooltip-action-hover-label-text-colorStateFallback var(--md-sys-color-primary) | Controls tooltip action hover label text color. |
--md-rich-tooltip-action-hover-state-layer-colorStateFallback var(--md-sys-color-primary) | Controls tooltip action hover state layer color. |
--md-rich-tooltip-action-hover-state-layer-opacityStateFallback var(--md-sys-state-hover-state-layer-opacity) | Controls tooltip action hover state layer opacity. |
--md-rich-tooltip-action-label-text-colorColorFallback var(--md-sys-color-primary) | Controls tooltip action label text color. |
--md-rich-tooltip-action-label-text-fontTypographyFallback var(--md-sys-typescale-label-large-font) | Controls tooltip action label text font. |
--md-rich-tooltip-action-label-text-line-heightTypographyFallback var(--md-sys-typescale-label-large-line-height) | Controls tooltip action label text line height. |
--md-rich-tooltip-action-label-text-sizeLayoutFallback var(--md-sys-typescale-label-large-size) | Controls tooltip action label text size. |
--md-rich-tooltip-action-label-text-trackingTypographyFallback var(--md-sys-typescale-label-large-tracking) | Controls tooltip action label text tracking. |
--md-rich-tooltip-action-label-text-typeTypographyFallback var(--md-sys-typescale-label-large) | Controls tooltip action label text type. |
--md-rich-tooltip-action-label-text-weightTypographyFallback var(--md-sys-typescale-label-large-weight) | Controls tooltip action label text weight. |
--md-rich-tooltip-action-pressed-label-text-colorStateFallback var(--md-sys-color-primary) | Controls tooltip action pressed label text color. |
--md-rich-tooltip-action-pressed-state-layer-colorStateFallback var(--md-sys-color-primary) | Controls tooltip action pressed state layer color. |
--md-rich-tooltip-action-pressed-state-layer-opacityStateFallback var(--md-sys-state-pressed-state-layer-opacity) | Controls tooltip action pressed state layer opacity. |
--md-rich-tooltip-container-colorColorFallback var(--md-sys-color-surface-container) | Controls tooltip container color. |
--md-rich-tooltip-container-elevationElevationFallback var(--md-sys-elevation-level2) | Controls tooltip container elevation. |
--md-rich-tooltip-container-shadow-colorColorFallback var(--md-sys-color-shadow) | Controls tooltip container shadow color. |
--md-rich-tooltip-container-shapeShapeFallback var(--md-shape-card) | Controls tooltip container shape. |
--md-rich-tooltip-subhead-colorColorFallback var(--md-sys-color-on-surface-variant) | Controls tooltip subhead color. |
--md-rich-tooltip-subhead-fontTypographyFallback var(--md-sys-typescale-title-small-font) | Controls tooltip subhead font. |
--md-rich-tooltip-subhead-line-heightTypographyFallback var(--md-sys-typescale-title-small-line-height) | Controls tooltip subhead line height. |
--md-rich-tooltip-subhead-sizeLayoutFallback var(--md-sys-typescale-title-small-size) | Controls tooltip subhead size. |
--md-rich-tooltip-subhead-trackingTypographyFallback var(--md-sys-typescale-title-small-tracking) | Controls tooltip subhead tracking. |
--md-rich-tooltip-subhead-typeTypographyFallback var(--md-sys-typescale-title-small) | Controls tooltip subhead type. |
--md-rich-tooltip-subhead-weightTypographyFallback var(--md-sys-typescale-title-small-weight) | Controls tooltip subhead weight. |
--md-rich-tooltip-supporting-text-colorColorFallback var(--md-sys-color-on-surface-variant) | Controls tooltip supporting text color. |
--md-rich-tooltip-supporting-text-fontTypographyFallback var(--md-sys-typescale-body-medium-font) | Controls tooltip supporting text font. |
--md-rich-tooltip-supporting-text-line-heightTypographyFallback var(--md-sys-typescale-body-medium-line-height) | Controls tooltip supporting text line height. |
--md-rich-tooltip-supporting-text-sizeLayoutFallback var(--md-sys-typescale-body-medium-size) | Controls tooltip supporting text size. |
--md-rich-tooltip-supporting-text-trackingTypographyFallback var(--md-sys-typescale-body-medium-tracking) | Controls tooltip supporting text tracking. |
--md-rich-tooltip-supporting-text-typeTypographyFallback var(--md-sys-typescale-body-medium) | Controls tooltip supporting text type. |
--md-rich-tooltip-supporting-text-weightTypographyFallback var(--md-sys-typescale-body-medium-weight) | Controls tooltip supporting text weight. |