The TourOverlay component handles the visual presentation of tours, including the spotlight effect, card positioning, and animations. It's typically used internally by TourMachine.
You are not expected to use this component directly, and this docs are here just to help you understand the internals of the library so you can get a better understanding of it.
Usage
import{TourOverlay}from'Tourista';// Usually used internally by TourMachine<TourOverlaytourId='onboarding'overlayStyles={{radius: 10,padding: 10,opacity: 0.2,colorRgb: '0, 0, 0', }}cardPositioning={{floating: true,side: 'top',distancePx: 0, }}/>;
Props
tourId
The ID of the tour to display overlay for.
Type: string
Required: Yes
Default: None
customCard
A custom React component to replace the default tour card.
Type: ComponentType<CardProps>
Required: No
Default: DefaultCard component
onOverlayClick
Callback function triggered when the overlay backdrop is clicked.
Type: () => void
Required: No
Default: None
backdropPointerEvents
Controls whether the backdrop captures pointer events.
Type: 'auto' | 'none'
Required: No
Default: 'auto'
overlayStyles
Styling configuration for the overlay and spotlight effect.