Hint
Hint component for displaying a tooltip over wrapped component
(code example)
You can either wrap a component or pass a specific targetFrame
Usageβ
<Hint visible={isVisible} message={'Message goes here'} color={Colors.red30} onBackgroundPress={() => setVisible(false)}> <Text>Text to hint</Text> </Hint>
APIβ
backdropColorβ
Color for background overlay (require onBackgroundPress)
string
borderRadiusβ
The hint's border radius
number
colorβ
The hint background color
string
containerWidthβ
The hint container width
number
customContentβ
Custom content element to render inside the hint container
JSX.Element
edgeMarginsβ
Hint margins from screen edges
number
enableShadowβ
Enable shadow (for hint with white background only)
boolean
iconβ
Icon to show next to the hint's message
ImageSourcePropType
iconStyleβ
The icon's style
ImageStyle
messageβ
The hint message
string | ReactElement
messageStyleβ
The hint message custom style
TextStyle
offsetβ
Hint offset from target
number
onBackgroundPressβ
Callback for the background press
(event: GestureResponderEvent) => void
onPressβ
Callback for Hint press
() => void
positionβ
The hint's position
TOP | BOTTOM
removePaddingsβ
Remove all hint's paddings
boolean
styleβ
Additional styling
ViewStyle
targetFrameβ
Provide custom target position instead of wrapping a child
{x?: number, y?: number, width?: number, height?: number}
testIDβ
The hint's test identifier
string
useModalβ
Open the hint using a Modal component
boolean
useSideTipβ
Show side tips instead of the middle tip
boolean
visibleβ
Control the visibility of the hint
boolean