Skip to content
nexubDesign System
v12.7.0

Components · Overlays

Tooltip

StableAdded v0.0.1

Floating label that appears on hover. Built on Radix UI Tooltip.

import { Tooltip } from '@nexub/react';
View as Markdown

Playground

Props

side
TSX
<Tooltip label="This is a tooltip">…</Tooltip>

Examples

Default

Sides

Props

Props
PropTypeDefaultDescription
contentrequiredReact.ReactNode—Content shown inside the tooltip.
side'top' | 'right' | 'bottom' | 'left''top'Preferred side to open.
delayDurationnumber700Delay in ms before tooltip opens.

Design tokens

Tooltip reads these component tokens. Each one is unset by default and falls back to the semantic role it aliases, so nothing changes until you set it. Set one on any element to restyle every Tooltip below it, and leave the roles other components share alone. See the three token tiers.

Tooltip design tokens
TokenAliasesNotes
--tooltip-bg--color-inverse-surface—
--tooltip-fg--color-inverse-on-surface—
--tooltip-radius--shape-tooltip—
CSS
/* One area of your app */
.checkout {
  --tooltip-bg: var(--color-secondary);
}