Skip to main content

Tooltip

#Tooltip text prompt

Effect demonstration

1. Default effect

<Tooltip content="InfoInfoInfo">
<Text variant="p0" color="primary200">
Press me
</Text>
</Tooltip>

2. Modify the background color

<Tooltip content="InfoInfoInfo" backgroundColor="red">
<Text variant="p0" color="primary200">
press me
</Text>
</Tooltip>

API

PropertiesRequiredDescriptionTypeDefault Value
contenttrueprompt textReactNode
widthfalsetooltip widthnumber40
heightfalsetooltip heightnumber150
backgroundColorfalsetooltip background colorstring#617080
containerStylefalsetooltip container styleStyleProp<ViewStyle>
withOverlayfalseWhether to display the mask layerbooleantrue
withCaretfalseWhether to display the small trianglebooleantrue
overlayColorfalseOverlay colorstringrgba(250, 250, 250, 0.70)
actionTypefalseThe click method that triggers the tooltiponPress | onLongPressonPress
onClosefalseEvent triggered when tooltip is closed() => void