Tooltip

A small contextual label that appears on hover or keyboard focus. Built on Radix UI Tooltip. Requires a TooltipProvider ancestor — add it once at your app root or layout.

Built on Radix UI.

  • Opens on hover and keyboard focus
  • Animated entry/exit with fade and zoom
  • Portal-based — renders outside the DOM flow
  • Configurable delay, side, alignment
  • Requires TooltipProvider once at the root

import { Tooltip }from "@aetherstack/ui"

tooltip.tsx
import {
  Tooltip,
  TooltipContent,
  TooltipProvider,
  TooltipTrigger,
} from "@/components/ui/tooltip"
import { Button } from "@/components/ui/button"

// Add TooltipProvider once in your layout or root component
export function TooltipDemo() {
  return (
    <TooltipProvider>
      <Tooltip>
        <TooltipTrigger asChild>
          <Button variant="outline">Hover me</Button>
        </TooltipTrigger>
        <TooltipContent>
          <p>This is a tooltip</p>
        </TooltipContent>
      </Tooltip>
    </TooltipProvider>
  )
}

Usage

Icon button tooltip

Always add tooltips to icon-only buttons.

Different sides

Control tooltip position with the side prop.

With delay

Use delayDuration to control how long before the tooltip appears.

Rich tooltip content

Props

PropTypeDefaultDescription

TooltipProvider

PropTypeDefaultDescription
delayDurationnumber700Milliseconds before the tooltip opens after hovering.
skipDelayDurationnumber300Milliseconds before delay is skipped (when moving between tooltips quickly).
disableHoverableContentbooleanfalseWhen true, tooltip closes immediately when the pointer moves to the content.

Tooltip (Root)

PropTypeDefaultDescription
openbooleanControlled open state.
defaultOpenbooleanfalseUncontrolled initial open state.
onOpenChange(open: boolean) => voidCallback when open state changes.
delayDurationnumberOverride the provider delay for this specific tooltip.

TooltipContent

PropTypeDefaultDescription
side"top" | "right" | "bottom" | "left""top"Preferred side to render.
sideOffsetnumber4Distance from the trigger in pixels.
align"start" | "center" | "end""center"Alignment relative to the trigger.
classNamestringAdditional classes. Use max-w-* for rich content.

* Required props

Accessibility

  • Tooltip text is announced by screen readers when the trigger receives focus.
  • Tooltip content is not interactive — do not put buttons or links inside a tooltip.
  • For interactive content on hover, use Popover (not included in this set) instead.
  • Always add aria-label to icon-only triggers — the tooltip alone is not sufficient for screen readers that don't use hover.
  • Tooltips must not contain essential information — always ensure the UI is usable without tooltip text visible.