FeatureHighlight
Component for feature discovery
(code example)
note
FeatureHighlight component must be a direct child of the root view returned in render(),If the element to be highlighted doesn't have a style attribute add 'style={{opacity: 1}}' so the Android OS can detect it,FeatureHighlight uses a native library. You MUST add and link the native library to both iOS and Android projects. For instruction please see: https://facebook.github.io/react-native/docs/linking-libraries-ios.html
#
Usage<FeatureHighlight visible={isVisible} title={'Title'} message={'Message goes here'} getTarget={targets[currentTarget]} confirmButtonProps={{label: 'Got It', onPress: () => console.log('confirmed')}} onBackgroundPress={() => console.log('background pressed')}/>
#
API#
borderColorColor of the border around the highlighted element
string
#
borderRadiusBorder radius for the border corners around the highlighted element
number
#
borderWidthWidth of the border around the highlighted element
number
#
confirmButtonPropsProps that will be passed to the dismiss button
ButtonProps
#
getTargetCallback that extract the ref of the element to be highlighted
() => any
#
highlightFrameFrame of the area to highlight {x, y, width, height}
HighlightFrame
#
innerPaddingThe padding of the highlight frame around the highlighted element's frame (only when passing ref in 'getTarget')
number
#
messageMessage to be displayed
string
#
messageNumberOfLinesMessage's max number of lines
number
#
messageStyleMessage text style
TextStyle
#
minimumRectSize#
Android API 21+, and only when passing a ref in 'getTarget'The minimum size of the highlighted component
RectSize
#
onBackgroundPressCalled the background pressed
TouchableWithoutFeedbackProps['onPress']
#
overlayColorColor of the content's background (usually includes alpha for transparency)
string
#
pageControlPropsPageControl component's props
PageControlProps
#
testIDThe test id for e2e tests
string
#
textColorColor of the content's text
string
#
titleTitle of the content to be displayed
string
#
titleNumberOfLinesTitle's max number of lines
number
#
titleStyleTitle text style
TextStyle
#
visibleDetermines if to present the feature highlight component
boolean