Hint
Hint component for displaying a tooltip over wrapped component
(code example)
note
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#
backdropColorColor for background overlay (require onBackgroundPress)
string
#
borderRadiusThe hint's border radius
number
#
colorThe hint background color
string
#
containerWidthThe hint container width
number
#
customContentCustom content element to render inside the hint container
JSX.Element
#
edgeMarginsHint margins from screen edges
number
#
enableShadowEnable shadow (for hint with white background only)
boolean
#
iconIcon to show next to the hint's message
ImageSourcePropType
#
iconStyleThe icon's style
ImageStyle
#
messageThe hint message
string | ReactElement
#
messageStyleThe hint message custom style
TextStyle
#
offsetHint offset from target
number
#
onBackgroundPressCallback for the background press
(event: GestureResponderEvent) => void
#
onPressCallback for Hint press
() => void
#
positionThe hint's position
TOP | BOTTOM
#
removePaddingsRemove all hint's paddings
boolean
#
styleAdditional styling
ViewStyle
#
targetFrameProvide custom target position instead of wrapping a child
{x?: number, y?: number, width?: number, height?: number}
#
testIDThe hint's test identifier
string
#
useModalOpen the hint using a Modal component
boolean
#
useSideTipShow side tips instead of the middle tip
boolean
#
visibleControl the visibility of the hint
boolean