BaseTooltip

A short label that appears beside a control.

Import it from rei-kit/web: import { BaseTooltip } from 'rei-kit/web'

Open BaseTooltip in the live documentation, where every prop below is a control you can change, in four materials and ten palettes.

Usage

<script setup lang="ts">
import { BaseButton } from 'rei-kit'
import { BaseTooltip } from 'rei-kit/web'
</script>

<template>
  <BaseTooltip label="Copy link">
    <BaseButton icon variant="ghost" aria-label="Copy link">⧉</BaseButton>
  </BaseTooltip>

  <!--
    `follow` tracks the pointer, for a target big enough that a bubble pinned
    to the middle would be nowhere near what is under the cursor. It falls
    back to the anchored bubble for a keyboard and for anyone who asked their
    system for less motion.
  -->
  <BaseTooltip label="Tuesday, 12 September — 3 entries" follow>
    <div class="bg-muted rounded-card grid h-24 w-full place-items-center">A calendar cell</div>
  </BaseTooltip>
</template>

Props

Props
PropTypeRequired or defaultWhat it is for
labelstringyesThe description. Already translated.
placement'top' | 'bottom''top'
followbooleanfalseTrack the pointer across the trigger instead of pinning to its middle.
offsetnumber14How far the bubble sits from the pointer, in pixels.

About rei-kit

rei-kit is an accessible Vue 3 and Tailwind CSS 4 component library: 106 components, themed by role rather than by colour on three independent axes — ten WCAG-checked palettes, four materials and light or dark, each switched with one attribute. Typed, tested, SSR-safe, no runtime dependencies, MIT.

pnpm add rei-kit · npm · GitHub