Overlay

Tooltips for contextual hints

Tooltips surface short explanations on hover or focus—icon buttons, truncated labels, and chart markers. Use them in React dashboards and Next.js admin tools with disciplined copy length.

Hover or focus me

Examples

Longer hover delay and danger intent for critical controls.


Slow hover

Delete row

Variant code examples

Each block matches one combination. Open “Show code” to copy the JSX; the leading comment names the variant row.

TooltipContent — variant

Surface style and padding scale. Root Tooltip uses default position="top" and delay here.


Hover · Variant: default · Size: md

Hover · Variant: outline · Size: md

Hover · Variant: ghost · Size: md

Hover · Variant: glass · Size: md

Hover · Variant: emerald · Size: md

Hover · Variant: indigo · Size: md

Hover · Variant: purple · Size: md

Hover · Variant: pink · Size: md

Hover · Variant: rose · Size: md

Hover · Variant: sky · Size: md

Hover · Variant: teal · Size: md

Hover · Variant: yellow · Size: md

Hover · Variant: orange · Size: md

Hover · Variant: green · Size: md

Hover · Variant: gradient-blue · Size: md

Hover · Variant: gradient-green · Size: md

Hover · Variant: gradient-red · Size: md

Hover · Variant: gradient-yellow · Size: md

Hover · Variant: gradient-purple · Size: md

Hover · Variant: gradient-teal · Size: md

Hover · Variant: gradient-indigo · Size: md

Hover · Variant: gradient-pink · Size: md

Hover · Variant: gradient-orange · Size: md

TooltipContent — size

Surface style and padding scale. Root Tooltip uses default position="top" and delay here.


Hover · Variant: default · Size: sm

Hover · Variant: default · Size: md

Hover · Variant: default · Size: lg

TooltipContent — width

Width is controlled on the content; default is fit.


Hover · Variant: default · Width: fit

Hover · Variant: default · Width: xs

Hover · Variant: default · Width: sm

Hover · Variant: default · Width: md

Hover · Variant: default · Width: lg

Hover · Variant: default · Width: xl

Hover · Variant: default · Width: 2xl

Tooltip — position

Placement is controlled on the root; content still picks up data-open for animation classes.


Position: top

Hover

Position: bottom

Hover

Position: left

Hover

Position: right

Hover

TooltipContent — animation

Enter motion tied to data-open (fade is default and omitted in snippets).


Hover · animation · fade

Hover · animation · scale

Hover · animation · none

What it does

Delay appearance slightly to avoid tooltip storms while moving the pointer.

Ensure triggers remain focusable for keyboard users.

Composition and API

Prefer compound subcomponents instead of one oversized prop bag. Export a small, documented API for your design system.

Do not place essential instructions only inside tooltips.

Common use cases

  • Disambiguate icon-only toolbar controls.
  • Clarify truncated column headers.
  • Explain formula fields in spreadsheets.
  • Offer units on compact KPIs.

Accessibility

Keyboard order, focus rings, and ARIA attributes should match production usage. Test with your supported browsers and assistive technologies when semantics are non-trivial.

This preview page exposes a single h1 in the hero for a clean outline.

Next.js integration notes

Colocate examples under the App Router, keep server and client boundaries explicit, and avoid pulling interactive overlays into unexpected server layouts.

Set NEXT_PUBLIC_SITE_URL so canonical and Open Graph URLs resolve on deploy.

FAQ

Does the Tooltip component work with Next.js App Router?

Yes. Import it like any other React component; keep interactive subtrees in client components when you need hooks or browser APIs, and leave static structure in server components where possible.

Can I customize tooltip with Tailwind CSS?

Zentauri UI exposes class-friendly variants and slots so you can extend styles with Tailwind utilities without fighting inline styles.

Is this Tooltip implementation accessible by default?

Primitives follow sensible defaults, but accessibility depends on how you label controls, manage focus, and wire keyboard handlers in your app. Validate critical flows with keyboard-only use and screen readers.