FeatureHighlight
Component for feature discovery
(code example)
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β
borderColorβ
Color of the border around the highlighted element
string
borderRadiusβ
Border radius for the border corners around the highlighted element
number
borderWidthβ
Width of the border around the highlighted element
number
confirmButtonPropsβ
Props that will be passed to the dismiss button
ButtonProps
getTargetβ
Callback that extract the ref of the element to be highlighted
() => any
highlightFrameβ
Frame of the area to highlight {x, y, width, height}
HighlightFrame
innerPaddingβ
The padding of the highlight frame around the highlighted element's frame (only when passing ref in 'getTarget')
number
messageβ
Message to be displayed
string
messageNumberOfLinesβ
Message's max number of lines
number
messageStyleβ
Message text style
TextStyle
minimumRectSizeβ
Android API 21+, and only when passing a ref in 'getTarget'β
The minimum size of the highlighted component
RectSize
onBackgroundPressβ
Called the background pressed
TouchableWithoutFeedbackProps['onPress']
overlayColorβ
Color of the content's background (usually includes alpha for transparency)
string
pageControlPropsβ
PageControl component's props
PageControlProps
testIDβ
The test id for e2e tests
string
textColorβ
Color of the content's text
string
titleβ
Title of the content to be displayed
string
titleNumberOfLinesβ
Title's max number of lines
number
titleStyleβ
Title text style
TextStyle
visibleβ
Determines if to present the feature highlight component
boolean