Skip to content

OrigamTooltip ​

<OrigamTooltip> is a non-interactive floating label that appears on hover (or focus) near its activator element. It wraps OrigamOverlay with role="tooltip", hover-open defaults, and eager rendering.

Basic usage ​

vue
<template>
    <OrigamTooltip text="Save your work">
        <template #activator="{ props: a }">
            <OrigamBtn v-bind="a" icon="mdi-content-save" />
        </template>
    </OrigamTooltip>
</template>

Location ​

Position relative to the activator: top, bottom, left, right (default).

vue
<template>
    <OrigamTooltip text="Above" location="top">
        <template #activator="{ props: a }">
            <OrigamBtn v-bind="a">Hover</OrigamBtn>
        </template>
    </OrigamTooltip>
</template>

Custom content ​

Use the default slot for rich tooltip content.

vue
<template>
    <OrigamTooltip>
        <template #activator="{ props: a }">
            <OrigamBtn v-bind="a">Rich</OrigamBtn>
        </template>
        <strong>Bold</strong> tooltip with <em>markup</em>.
    </OrigamTooltip>
</template>

Open on click ​

vue
<template>
    <OrigamTooltip text="Click to see" open-on-click :open-on-hover="false">
        <template #activator="{ props: a }">
            <OrigamBtn v-bind="a">Click</OrigamBtn>
        </template>
    </OrigamTooltip>
</template>

Offset ​

vue
<template>
    <OrigamTooltip text="Offset tooltip" :offset="20">
        <template #activator="{ props: a }">
            <OrigamBtn v-bind="a">Offset</OrigamBtn>
        </template>
    </OrigamTooltip>
</template>

Slots ​

SlotSlot propsDescription
activator{ props }Element that triggers the tooltip. Spread props.
default—Tooltip content (falls back to the text prop).

Events ​

NamePayloadWhen
update:modelValuebooleanTooltip opens / closes.

Props — Typography ​

These props override the matching --origam-tooltip---font-* CSS variable via an inline custom property on the tooltip content surface. Unset props leave the theme value in control.

PropTypeValuesDescription
fontSizeTFontSizexs · sm · md · lg · xl · 2xl · 3xl · 4xl · 5xlOverrides --origam-tooltip---font-size.
fontWeightTFontWeightregular · medium · semibold · bold · extrabold · blackOverrides --origam-tooltip---font-weight.
lineHeightTLineHeightnone · tight · snug · normal · relaxed · looseOverrides --origam-tooltip---line-height.

Design tokens ​

CSS variableDescription
--origam-tooltip---background-colorBackground (defaults to neutral-800).
--origam-tooltip---colorText color (defaults to inverse text).
--origam-tooltip---font-sizeFont size (0.75 rem).
--origam-tooltip---font-weightFont weight (500).
--origam-tooltip---line-heightLine height (1.5).
--origam-tooltip---padding-blockVertical padding.
--origam-tooltip---padding-inlineHorizontal padding.
--origam-tooltip---border-radiusBorder radius.
--origam-tooltip---max-widthMaximum width.
--origam-tooltip---z-indexZ-index.

Accessibility ​

  • role="tooltip" is set on the floating surface.
  • The activator receives aria-describedby pointing to the tooltip id.
  • Tooltip is shown on both mouse hover and keyboard focus.
  • Does not receive focus itself; it is informational only.