Skip to main content

CoachmarkTour

A guided tour system that displays contextual coachmarks to walk users through multiple steps of an interface.

Submit feedback
github
import { CoachmarkTour } from '@abyss/mobile';

Basic Usage

The CoachmarkTour system consists of two main components: CoachmarkTour (the provider) and CoachmarkTour.Step (wrapper for target elements). The tour displays Coachmarks in sequence to guide users through your interface.

Important: The children prop in CoachmarkTour.Step is different from Coachmark's children prop. In CoachmarkTour.Step, the children prop contains the target element to highlight, while the coachmark content should be passed via the description prop. This is unlike Coachmark where the children prop contains the coachmark content itself.

Tour Navigation

This example demonstrates navigation controls, multiple steps, position control, and different coachmark types. Users can skip the tour at any time using the close button, and callbacks are provided for navigation events.

Step Ordering

Steps are displayed in the order of their stepId regardless of their DOM order, giving you full control over the tour flow.

CoachmarkTour Props

Prop NameTypeDefaultDescription
dismissiblebooleantrueWhether coachmarks can be dismissed with close button
initialStepnumber1The step to start the tour from
isStartedbooleanfalseControls whether the tour is active
onCompletefunction-Callback fired when tour is completed
onNextfunction-Callback fired when user clicks Next button
onPreviousfunction-Callback fired when user clicks Previous button
onSkipfunction-Callback fired when tour is skipped via close button
position'above' | 'below'-Default position for all coachmarks (can be overridden per step). Options: above, below
type'dark' | 'light' | 'light-border'light-borderVisual variant applied to all coachmarks in the tour. Options: dark, light, light-border

CoachmarkTour.Step Props

Prop NameTypeDefaultDescription
childrenReactElement-The target element to highlight during this step (not the coachmark content)
descriptionstring | ReactNode-Content displayed in the coachmark body
headingstring-Title displayed in the coachmark
position'above' | 'below'-Preferred position for this step coachmark. Options: above, below
stepIdnumber-Unique identifier that determines the order of steps in the tour
wrapperStyleViewStyle-Style object applied to the wrapper around the target element

CoachmarkTour Classes

Class NameDescription
abyss-coachmark-tour-element-wrapperWrapper element around the target component
abyss-coachmark-tour-rootRoot container for the tour
Table of Contents