Components · Overlays
Tooltip
StableAdded v0.0.1
Floating label that appears on hover. Built on Radix UI Tooltip.
import { Tooltip } from '@nexub/react';Playground
Props
side
<Tooltip label="This is a tooltip">…</Tooltip>Examples
Default
Sides
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| contentrequired | React.ReactNode | — | Content shown inside the tooltip. |
| side | 'top' | 'right' | 'bottom' | 'left' | 'top' | Preferred side to open. |
| delayDuration | number | 700 | Delay 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.
| Token | Aliases | Notes |
|---|---|---|
| --tooltip-bg | --color-inverse-surface | — |
| --tooltip-fg | --color-inverse-on-surface | — |
| --tooltip-radius | --shape-tooltip | — |
/* One area of your app */
.checkout {
--tooltip-bg: var(--color-secondary);
}On iOS & Android: Tooltip
@nexub/react-nativeAlpha
import { Tooltip } from '@nexub/react-native';
<Tooltip label="Copy link">
<IconButton icon={Copy} label="Copy" />
</Tooltip>Web vs mobile
Same tokens and prop names. Where the platforms differ:
| Web | iOS & Android | |
|---|---|---|
| Trigger | Hover or keyboard focus, after delayDuration. | Long-press; delayDuration is how long to hold. |
| Hiding | When the pointer or focus leaves. | After duration (2.5s) or a tap anywhere. |
| Screen readers | The tip describes the trigger. | The tip is the child’s accessibilityHint; the popover is hidden from VoiceOver and TalkBack. |
| Content | label can be any node, with description, shortcut and arrow. | A text label only. |
Interactive preview of @nexub/react-native rendered for the web. Native chrome (switches, pickers, Liquid Glass) looks like the platform on a device.
On device

iPhone (iOS simulator)

Pixel (Android emulator)
Screenshots from the latest CI run of the showcase app; the live frame renders the same code for the web.
Tooltip props
| Prop | Type | Default | Description |
|---|---|---|---|
| labelrequired | string | — | The tip. Screen readers get it as the child's hint, without the popover. |
| side | 'top' | 'right' | 'bottom' | 'left' | 'top' | — |
| delayDuration | number | 400 | How long to hold before the tip shows, in ms. |
| duration | number | 2500 | How long the tip stays, in ms. A tap anywhere hides it sooner. |
| childrenrequired | React.ReactElement<TriggerProps> | — | One pressable element (Button, IconButton, Pressable): it gets onLongPress and the hint. |