React Native · Components
Tooltip
A short description bubble.
Live example
The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.
Preview
Code
Events
- Events appear here when you interact with the preview.
The tooltip prop on every component
Monthly quota: 80 / 100
interactive: a tooltip with a link inside
VAT included
Tooltip: for your own elements
Import
Tooltip
componentA short description bubble. Same API as the web Tooltip; works for touch screens: opens on long press (touch="longPress") or on tap (touch="tap"). The text is also given to screen readers as the trigger's hint (accessibilityHint). Looks the same on iOS and Android.
Examples
TooltipSide
typePosition of the tooltip relative to the trigger. See Placement.
TooltipTouch
typeHow the tooltip opens on touch screens (same as web).
"longPress": Opens on long press; a normal tap does the element's own job (buttons, checkboxes). Closes shortly after the finger lifts."tap": Toggles on tap; closes when tapping elsewhere (for purely informational ⓘ icons).
TooltipProps
interfaceProps of the Tooltip component.
| Name | Type | Default | Description |
|---|---|---|---|
children | ReactElement | The single element that triggers the tooltip (Pressable-based: Button, Pressable…). | |
content | ReactNode | Tooltip text. Keep it short; no tooltip is shown if empty. | |
side? | TooltipSide | "auto"` (above, below if it does not fit, then the sides) | Position relative to the trigger. |
longPressDelay? | number | 500 | Long press duration to open (ms). |
touch? | TooltipTouch | "longPress" | How it opens on touch screens. See TooltipTouch. |
interactive? | boolean | false | Can the inside of the tooltip be tapped (if the content has a link or a button)? While on, it does not close when the finger lifts; tapping outside closes it. |
closeDelay? | number | 1500 | Close delay after the finger lifts (ms). |
tone? | Tone | "neutral" | Semantic color of the box. See Tone. |
style? | ViewStyle | Style of the box. |
TooltipOptions
typeOptions given as an object to the tooltip prop.
| Name | Type | Default | Description |
|---|---|---|---|
content | ReactNode | Tooltip text. Keep it short; no tooltip is shown if empty. | |
side? | TooltipSide | "auto"` (above, below if it does not fit, then the sides) | Position relative to the trigger. |
longPressDelay? | number | 500 | Long press duration to open (ms). |
touch? | TooltipTouch | "longPress" | How it opens on touch screens. See TooltipTouch. |
interactive? | boolean | false | Can the inside of the tooltip be tapped (if the content has a link or a button)? While on, it does not close when the finger lifts; tapping outside closes it. |
closeDelay? | number | 1500 | Close delay after the finger lifts (ms). |
tone? | Tone | "neutral" | Semantic color of the box. See Tone. |
style? | ViewStyle | Style of the box. |
TooltipProp
typeType of components' tooltip prop (same as web). It can be given in two forms:
- Content:
tooltip="Copy link"or any content. - With options:
tooltip={{ content: "Save", side: "bottom", touch: "tap" }}. SeeTooltipOptions.
On touch screens the tooltip opens on long press (touch="longPress"). false, null or empty text disables the tooltip.