sigilUI

Tooltip

A brief text label that appears on hover or focus. Built on Radix Tooltip with token-driven delay, offset, and styling.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { Tooltip, TooltipProvider } from "@sigil-ui/components";

Setup

Wrap your app in <TooltipProvider>:

<TooltipProvider>
  <App />
</TooltipProvider>

Usage

Tooltip is a wrapper component. Pass content for the tooltip text and a single element as children (via asChild):

<Tooltip content="More information">
  <Button variant="ghost" size="sm">
    <InfoIcon className="size-4" />
  </Button>
</Tooltip>

Placement

<Tooltip content="Above" side="top"><Button>Top</Button></Tooltip>
<Tooltip content="Right" side="right"><Button>Right</Button></Tooltip>
<Tooltip content="Below" side="bottom"><Button>Bottom</Button></Tooltip>
<Tooltip content="Left" side="left"><Button>Left</Button></Tooltip>

Custom delay

<TooltipProvider delayDuration={0}>
  <Tooltip content="No delay">
    <Button>Instant tooltip</Button>
  </Tooltip>
</TooltipProvider>

Token integration

CSS VariableUsed for
--s-surfaceTooltip background
--s-textTooltip text color
--s-radius-smBorder radius
--s-shadow-smSubtle elevation
--s-duration-fastFade animation
--s-font-size-smText size

Props

Tooltip

PropTypeDefaultDescription
contentstring—Tooltip text
side"top" | "right" | "bottom" | "left""top"Preferred side
delayDurationnumber200Open delay in ms
childrenReactNode—Single trigger element (via asChild)

TooltipProvider

PropTypeDefaultDescription
delayDurationnumber400Open delay in ms

Accessibility

  • Tooltip appears on both hover and focus
  • Content is linked via aria-describedby
  • Escape closes the tooltip
  • Children must be a single element (required by asChild)
  • Follows WAI-ARIA Tooltip pattern