Expo UI Tooltip matches the official Jetpack Compose Tooltip API. TooltipBox wraps anchor content and displays a tooltip. The tooltip content is provided via the TooltipBox.PlainTooltip or TooltipBox.RichTooltip compound components, which match PlainTooltip and RichTooltip respectively. Tooltips can be triggered by long-press or shown programmatically via ref.
Long-press the anchor content to display the tooltip.
PlainTooltipExample.tsx
import{Host,TooltipBox,Button,Text,}from'@expo/ui/jetpack-compose';exportdefaultfunctionPlainTooltipExample(){return(<HostmatchContents><TooltipBox><TooltipBox.PlainTooltip><Text>Add to favorites</Text></TooltipBox.PlainTooltip><ButtononClick={()=>{}}><Text>Favorite</Text></Button></TooltipBox></Host>);}
Rich tooltip with title and body
Use TooltipBox.RichTooltip with Title and Text compound component pattern for more detailed contextual information.
RichTooltipExample.tsx
import{Host,TooltipBox,Button,Text,}from'@expo/ui/jetpack-compose';exportdefaultfunctionRichTooltipExample(){return(<HostmatchContents><TooltipBox><TooltipBox.RichTooltip><TooltipBox.RichTooltip.Title><Text>Camera</Text></TooltipBox.RichTooltip.Title><TooltipBox.RichTooltip.Text><Text>
Take photos and record videos with your device camera.
</Text></TooltipBox.RichTooltip.Text></TooltipBox.RichTooltip><ButtononClick={()=>{}}><Text>Open Camera</Text></Button></TooltipBox></Host>);}
Rich tooltip with action
Add an interactive action with TooltipBox.RichTooltip.Action. Use isPersistent so the tooltip stays visible for the user to tap it. hasAction is automatically derived when an action slot is present.
RichTooltipActionExample.tsx
import{Host,TooltipBox,Button,TextButton,Text,}from'@expo/ui/jetpack-compose';exportdefaultfunctionRichTooltipActionExample(){return(<HostmatchContents><TooltipBoxisPersistent><TooltipBox.RichTooltip><TooltipBox.RichTooltip.Title><Text>Permissions required</Text></TooltipBox.RichTooltip.Title><TooltipBox.RichTooltip.Text><Text>
This feature requires camera and microphone access.
</Text></TooltipBox.RichTooltip.Text><TooltipBox.RichTooltip.Action><TextButtononClick={()=>{}}><Text>Learn more</Text></TextButton></TooltipBox.RichTooltip.Action></TooltipBox.RichTooltip><ButtononClick={()=>{}}><Text>Record video</Text></Button></TooltipBox></Host>);}
Programmatic show and dismiss
Use a ref to imperatively show() or dismiss() the tooltip without requiring a long-press.
A container that wraps anchor content and shows a tooltip on long-press.
Provide the tooltip content via TooltipBox.PlainTooltip or TooltipBox.RichTooltip.
All other children are the anchor/trigger.
Use ref to imperatively show() or dismiss() the tooltip.
Children containing a TooltipBox.PlainTooltip or TooltipBox.RichTooltip slot and the anchor/trigger content.
The anchor content triggers the tooltip on long-press.
enableUserInput
Android
Optional • Type: boolean • Default: true
Whether user input (long-press, hover) triggers the tooltip.
focusable
Android
Optional • Type: boolean • Default: false
Whether the tooltip popup is focusable.
hasAction
Android
Optional • Type: boolean
Whether the tooltip contains an action. Affects accessibility and dismiss behavior.
When not specified, this is automatically derived from the presence of a RichTooltip.Action slot.
isPersistent
Android
Optional • Type: boolean • Default: false
Whether the tooltip persists instead of auto-dismissing after a short timeout.