React Native Spotlight Tour - API Reference
React Native Spotlight Tour - API Reference / SpotlightTourProviderProps
Interface: SpotlightTourProviderProps
Defined in: package/src/lib/SpotlightTour.provider.tsx:31
Configuration object which accepts Floating Ui middleware, placement and sameScrollView configurations.
Extends
Properties
arrow?
optional
arrow:number
|boolean
|ArrowOptions
Defined in: package/src/lib/SpotlightTour.context.ts:155
Tooltip arrow options. It accepts 3 types of value:
- boolean: When
false
, disable rendering the arrow. Whiletrue
renders using the default values. - number: Use it to change the size of the arrow only.
- object: Options to further customize the arrow style.
Default
20
Inherited from
children
children:
ReactNode
|ChildFn
<SpotlightTour
>
Defined in: package/src/lib/SpotlightTour.provider.tsx:38
The children to render in the provider. It accepts either a React
component, or a function that returns a React component. When the child is
a function, the SpotlightTour
context can be accessed from the first
argument.
flip?
optional
flip:boolean
|FlipOptions
Defined in: package/src/lib/SpotlightTour.context.ts:161
Enables flipping the placement of the tooltip in order to keep it in view.
Default
true
Inherited from
motion?
optional
motion:Motion
Defined in: package/src/lib/SpotlightTour.provider.tsx:45
Sets the default transition motion for all steps. You can override this value on each step too.
Default
bounce
nativeDriver?
optional
nativeDriver:boolean
|OSConfig
<boolean
>
Defined in: package/src/lib/SpotlightTour.provider.tsx:54
Define if the animations in the tour should use the native driver or not.
A boolean can be used to apply the same value to both Android and iOS, or
an object with android
and ios
keys can be used to define a value for
each OS.
Default
false
offset?
optional
offset:number
Defined in: package/src/lib/SpotlightTour.context.ts:167
Offset points between the tooltip and the spotlight.
Default
4
Inherited from
onBackdropPress?
optional
onBackdropPress:BackdropPressBehavior
Defined in: package/src/lib/SpotlightTour.provider.tsx:66
Sets the default behavior of pressing the tour’s backdrop. You can use either one of the following values:
- A callback function with the SpotlightTour options object in the first argument. This allows more granular control over the tour.
- The
continue
literal string, which is a shortcut to move to the next step, and stop the tour on the last step. - the
stop
literal string, which is a shortcut to stop the tour.
NOTE: You can also override this behavior on each step configuration.
onPause()?
optional
onPause: (values
) =>void
Defined in: package/src/lib/SpotlightTour.provider.tsx:72
Handler which gets executed when pause is invoked. It receives the TourState so you can access the step index where the tour paused.
Parameters
values
Returns
void
onResume()?
optional
onResume: (values
) =>void
Defined in: package/src/lib/SpotlightTour.provider.tsx:78
Handler which gets executed when resume is invoked. It receives the ResumeParams so you can access the step index where the tour resumed.
Parameters
values
Returns
void
onStop()?
optional
onStop: (values
) =>void
Defined in: package/src/lib/SpotlightTour.provider.tsx:86
Handler which gets executed when stop is
invoked. It receives the TourState so
you can access the current
step index where the tour stopped
and a bool value isLast
indicating if the step where the tour stopped is
the last one.
Parameters
values
Returns
void
overlayColor?
optional
overlayColor:ColorValue
Defined in: package/src/lib/SpotlightTour.provider.tsx:92
The color of the overlay of the tour.
Default
black
overlayOpacity?
optional
overlayOpacity:number
Defined in: package/src/lib/SpotlightTour.provider.tsx:98
The opacity applied to the overlay of the tour (between 0 to 1).
Default
0.45
placement?
optional
placement:Placement
Defined in: package/src/lib/SpotlightTour.context.ts:173
The placement of the tooltip relative to the spotlight.
Default
"bottom"
Inherited from
shape?
optional
shape:Shape
|ShapeOptions
Defined in: package/src/lib/SpotlightTour.provider.tsx:105
Configures the default spotlight shape for all steps. You can override this value on each step too.
Default
circle
shift?
optional
shift:boolean
|ShiftOptions
Defined in: package/src/lib/SpotlightTour.context.ts:179
Enables shifting the tooltip in order to keep it in view.
Default
{ padding: 8 }
Inherited from
steps
steps:
TourStep
[]
Defined in: package/src/lib/SpotlightTour.provider.tsx:109
An array of TourStep
objects that define each step of the tour.