Expo App UIExpo App UI
Components

Tooltip

Long-press tooltip that auto-positions and clamps within the viewport.

Installation

npx expo-app-ui add tooltip

Usage

import Tooltip from "@/components/ui/tooltip";

<Tooltip content="Save your changes" placement="top">
  <Button title="Save" onPress={() => {}} />
</Tooltip>

Props

PropTypeDefaultDescription
contentstringrequiredTooltip text
childrenReactElementrequiredTrigger element
placement'top' | 'bottom' | 'left' | 'right''top'Preferred placement
backgroundColorstring'#1F2937'Tooltip background
textColorstring'#FFFFFF'Text color
offsetnumber8Gap from trigger
maxWidthnumber240Max tooltip width
disabledbooleanfalseDisable trigger

Accessibility

  • Trigger has accessibilityHint
  • Tooltip body has accessibilityRole="text" with the content as label
  • Tap outside or anywhere to dismiss

On this page

Find this useful?

Buy me a coffee