‹ components

Tooltip

stablev1.0.0·open in canvas

Input-adaptive help bubble: hover tooltip on pointer devices, bottom-sheet dialog on touch (where hover doesn't exist, so a plain tooltip would be unreachable).

Installnpx shadcn add @cids/tooltip
Live demo
Organic score

Motion · tap to replay

honors reduced-motion

Fade in/out on the bubble; slide-from-bottom on the touch sheet (Radix `data-[state]` animations). Collapses under `prefers-reduced-motion` via the global reset.

Brand chip remounts on tap · highlighted tokens are named in this component's doc · spring is budgeted to human feedback only.

import { Tooltip } from "@/design-system";

<Tooltip content="Jupiter's 0–100 organic-volume estimate." title="Organic score">
  <button type="button" aria-label="About organic score">ⓘ</button>
</Tooltip>

Tokens · live

Resolves in the active theme — flip the toggle above to verify.

States · from doc

Parsed from the doc. Interact with the live demo for hover/active.

Closeddelayed-open on hover/focusopen sheet on tap.Dismiss: pointer-out / Escape ; Escape×outside-tap .

Input-adaptive help bubble: hover tooltip on pointer devices, bottom-sheet dialog on touch (where hover doesn't exist, so a plain tooltip would be unreachable).

Anatomy

pointer:                 touch:
   ┌ bubble ───────┐      ┌──── sheet ────────┐
   │ content       │      │ ▔▔ grabber        │
   └──▼ arrow──────┘      │ Title          ×  │
  [trigger]               │ content           │
                          └───────────────────┘

Props

PropTypeDefaultNotes
contentReactNode—The help content.
childrenReactNode—Trigger (rendered asChild — must accept a ref, e.g. a button).
side"top" "right" \"bottom" \"left"`"top"Bubble placement (pointer only).
titlestring"Details"Sheet heading (touch only).
classNamestring—cn-merged onto the floating content.

Motion

data-[state] animations). Collapses under prefers-reduced-motion

via the global reset.

A11y

Escape dismisses, the sheet traps focus and restores it on close.

the sole path to content.

supplementary, not the accessible name).

Self-contained: copy the folder into any Tailwind+React app, or use the install command above. Docs and this page render the same file on disk — they cannot drift.