Skip to content

Tooltip

Hover and press tooltips (Tooltip and InfoTip) rendered in a portal.

Interfaces

TooltipProps

Defined in: src/shared/ui/Tooltip.tsx:9

Properties

Property Type Description Defined in
children ReactNode The trigger the bubble is anchored to. src/shared/ui/Tooltip.tsx:17
className? string Extra classes for the inline trigger wrapper. src/shared/ui/Tooltip.tsx:19
label ReactNode The bubble content. A string renders as a light hover/tap tooltip; rich content (any element) renders as a click-to-open popover, so a longer explanation stays put while it is read. src/shared/ui/Tooltip.tsx:15
wide? boolean Widen a string bubble for sentence-length text. src/shared/ui/Tooltip.tsx:21

Functions

InfoTip()

function InfoTip(props): Element;

Defined in: src/shared/ui/Tooltip.tsx:134

A small "?" trigger that reveals content in a Tooltip. Replaces the per-panel info-dot copies. A string shows on hover / tap; rich content opens a click popover.

Parameters

Parameter Type Description
props { className?: string; content: ReactNode; wide?: boolean; } The bubble content and options.
props.className? string -
props.content ReactNode -
props.wide? boolean -

Returns

Element

The info dot.


Tooltip()

function Tooltip(props): Element;

Defined in: src/shared/ui/Tooltip.tsx:33

A tooltip / info popover that renders into a portal and positions itself from the trigger's rect, clamped into the viewport. Portalling escapes overflow clipping, and the clamp keeps it on-screen on mobile (fixing the old CSS bubble that bled off small screens or was swallowed by a scroll container).

Parameters

Parameter Type Description
props TooltipProps The bubble content, trigger, and options.

Returns

Element

The trigger with its portalled bubble.