Tooltip
A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
Default
<script setup lang="ts">
import { Button, Tooltip } from 'frappe-ui'
</script>
<template>
<Tooltip text="This action cannot be undone" :hover-delay="0" placement="top">
<Button theme="red">Delete</Button>
</Tooltip>
</template>With Slots
<script setup lang="ts">
import { Button, Tooltip } from 'frappe-ui'
</script>
<template>
<Tooltip arrow-class="fill-surface-white" placement="top">
<template #body>
<div
class="min-w-[6rem] rounded bg-surface-white px-2 py-1 text-xs text-ink-gray-9 shadow-xl"
>
Test
</div>
</template>
<Button theme="red">Delete</Button>
</Tooltip>
</template>API Reference
Tooltip
Show types
import { type HTMLAttributes } from 'vue'
import { type TooltipContentProps } from 'reka-ui'
export interface TooltipProps {
/**
* Text content shown inside the tooltip.
* Ignored if a default slot is provided.
*/
text?: string
/**
* Delay (in ms) before showing the tooltip on hover.
*/
hoverDelay?: number
/**
* Position of the tooltip relative to the trigger.
*/
placement?: TooltipContentProps['side']
/**
* Custom classes applied to the tooltip arrow.
*/
arrowClass?: HTMLAttributes['class']
/**
* Disables the tooltip entirely.
*/
disabled?: boolean
}Text content shown inside the tooltip. Ignored if a default slot is provided.
Delay (in ms) before showing the tooltip on hover.
Position of the tooltip relative to the trigger.
Custom classes applied to the tooltip arrow.
Disables the tooltip entirely.
| Slot | Payload |
|---|---|
default | — Default trigger slot. Wraps the element that the tooltip is attached to. |
body | — Slot for fully custom tooltip body. Replaces the default tooltip container entirely. |
content | — Slot for tooltip content text. Used inside the default tooltip body. |
Default trigger slot. Wraps the element that the tooltip is attached to.
Slot for fully custom tooltip body. Replaces the default tooltip container entirely.
Slot for tooltip content text. Used inside the default tooltip body.
TooltipBubble
Show types
import { type HTMLAttributes } from 'vue'
import { type TooltipContentProps } from 'reka-ui'
export interface TooltipProps {
/**
* Text content shown inside the tooltip.
* Ignored if a default slot is provided.
*/
text?: string
/**
* Delay (in ms) before showing the tooltip on hover.
*/
hoverDelay?: number
/**
* Position of the tooltip relative to the trigger.
*/
placement?: TooltipContentProps['side']
/**
* Custom classes applied to the tooltip arrow.
*/
arrowClass?: HTMLAttributes['class']
/**
* Disables the tooltip entirely.
*/
disabled?: boolean
}Preferred popover side relative to the trigger.
Text content when neither `#content` nor `#body` is provided.
Fill class for the arrow — defaults to match the bubble shell.
| Slot | Payload |
|---|---|
default | — Replaces just the text inside the standard bubble. |
content | — Replaces just the text inside the standard bubble. |
body | — Replaces the entire bubble (including its shell) — arrow still renders. |
Replaces just the text inside the standard bubble.
Replaces just the text inside the standard bubble.
Replaces the entire bubble (including its shell) — arrow still renders.