Tooltip

Brief text that explains a control, shown on a long press.

import { CopyTooltip, Tooltip } from "@plexui/react-native"

Examples

Overview

Copy Tooltip

Platforms

iOS 26Android
Native componentNone (iOS has tooltips only for a pointer: a Plex view drawn as the web's tooltip)None (a Plex view drawn as Material 3's tooltips)
LookA white card with a soft shadow; compact: a dark capsuleCompact: the plain tooltip on the inverse surface; otherwise the rich tooltip's container

API

Tooltip

PropTypeDefaultDescription
childrenReactElement—The trigger: a single element. Wrap plain text in Tooltip.TriggerDecorator
contentReactNode—Tooltip content (null = no tooltip)
compactbooleanfalseShort 1-3 word tooltips, inverse styling (Material's plain tooltip on Android)
maxWidthnumber | "none"300Max width of tooltip; none keeps it on one line
side"top" | "right" | "bottom" | "left""top"Preferred side
sideOffsetnumber5Distance from trigger (at most 4dp on Android)
align"start" | "center" | "end""center"Alignment
alignOffsetnumber0Alignment offset
gutterSize"sm" | "md" | "lg""md"Content padding (iOS)
forceOpenboolean—Force open or closed
contentStyleStyleProp<ViewStyle>—Style of the tooltip's panel
testIDstring—Test id

Tooltip.TriggerDecorator turns text into a trigger that a tap or a long press opens (focusable, default true, makes it a stop of the web's keyboard). It is a Text of its own, so it takes variant, size, weight, color and style for the type the web's decorator inherits from the text around it. The web's openDelay, interactive and preventUnintentionalClickToClose are for a pointer's hover and have no counterpart; contentStyle stands for contentClassName.

CopyTooltip

PropTypeDefaultDescription
childrenReactElement—Trigger element (a Button, or text in Tooltip.TriggerDecorator)
copyValuestring—Required. Content to copy to clipboard
side"top" | "right" | "bottom" | "left""top"Preferred side of the trigger
sideOffsetnumber5Distance from trigger
align"start" | "center" | "end""center"Preferred alignment against the trigger
alignOffsetnumber0Offset from start/end alignment
onCopy(copied: boolean) => void—Called once the clipboard write settles, with whether it succeeded. The tooltip says Copied! only after a successful write
copy(value: string) => Promise<boolean | void> | boolean | void—Writes to the clipboard in place of the default; false or a throw is a failed write
testIDstring—Test id