Components

Tooltip

Add tooltips to buttons and links.

UiTooltip is a generic tooltip wrapper for any trigger element. UiButtonTooltip and UiLinkTooltip wrap a button or link with a floating tooltip, adding button/link semantics on top.

Wrap any element

Use UiTooltip when the trigger isn't a plain button or link — its default slot is the trigger, and text sets the tooltip content.

<template>
  <UiTooltip text="Helpful hint" placement="bottom">
    <UiButton variant="outline" text="Hover me" />
  </UiTooltip>
</template>

Rich tooltip content

Use the #content slot instead of text for markup like kbd shortcuts or links.

<template>
  <UiTooltip placement="top">
    <UiButton variant="outline" icon>
      <template #icon>
        <UiIconMaterial icon-code="&#xe161;" />
      </template>
    </UiButton>
    <template #content>
      Save changes <kbd>Ctrl</kbd> + <kbd>S</kbd>
    </template>
  </UiTooltip>
</template>

Button with a tooltip

<template>
  <UiButtonTooltip variant="outline" icon tooltip-text="Add item">
    <template #icon>
      <UiIconMaterial icon-code="&#xe145;" />
    </template>
  </UiButtonTooltip>
</template>
<script setup lang="ts">
import { NuxtLink } from '#components'
</script>

<template>
  <UiLinkTooltip
    :as="NuxtLink"
    to="/docs"
    text="Docs"
    tooltip-text="Read the documentation"
    placement="bottom"
  />
</template>

UiTooltip props

PropTypeDefaultDescription
textstring | nullPlain-text tooltip content. Ignored when the #content slot is used.
placementFloatingPlacement'top'Tooltip position (top, bottom, left, right, and their -start/-end variants).
disabledbooleanfalseDisables the tooltip.
ariaIdstringAccessible id applied to the popper content. Auto-generated by floating-vue when omitted.
customClassstring | string[] | Record<string, boolean> | nullExtra classes for the trigger wrapper element.

Slots: default is the trigger element; content renders rich tooltip content instead of text.

UiTooltip frees you from wrapping a trigger in UiButtonTooltip/UiLinkTooltip when it isn't a plain button or link — for example an avatar, an icon, or a custom control.

UiButtonTooltip props

Extends UiButton props, plus:

PropTypeDefaultDescription
tooltipTextstringTooltip content.
placementPlacementTooltip position (top, bottom, left, right, …).
ariaExpandedbooleanForwarded aria-expanded.
ariaControlsstringForwarded aria-controls.

Emits: onClick.

UiLinkTooltip props

Extends the base button props, plus:

PropTypeDefaultDescription
tostring | objectRouter destination.
hrefstringExternal URL.
asstring | object'a'Link component.
tooltipTextstring | nullTooltip content.
placementPlacementTooltip position.
Copyright © 2026