ProductTour
ProductTour
displays a sequence of checkpoints with anchors around the DOM.
A ProductTour
takes a list of tour objects and will only support one enabled tour at a time. If multiple
tours are enabled, ProductTour
will only render the first enabled in the tours
list.
Checkpoints
are rendered in the order they're listed in the checkpoint array.
The checkpoint objects themselves have additional props that can override the props defined in ProductTour
.
Usage guidelines
Best practices for ProductTour includes not overloading the user with a large amount of steps. Paragon recommends keeping to no more than 5 steps, as well as any overriden button names to be descriptive and readable. Also, we recommend using a title at every step or only at the first step for a consistent and accessible experience.
Basic Usage
Any Paragon component or export may be added to the code example.
Theme Variables#
CSS Variable | Computed Value |
---|---|
| |
| |
| |
| |
| |
Props API#
- toursDefault{ advanceButtonText: '', backButtonText: '', checkpoints: { advanceButtonText: '', backButtonText: '', body: '', dismissAltText: '', endButtonText: '', onAdvance: () => {}, onDismiss: () => {}, onBack: () => {}, placement: 'top', title: '', }, dismissAltText: '', endButtonText: '', onBack: () => {}, onDismiss: () => {}, onEnd: () => {}, onEscape: () => {}, startingIndex: 0, }
shape
{advanceButtonText:node
,backButtonText:string
,checkpoints:shape
{advanceButtonText:node
,backButtonText:string
,body:node
,dismissAltText:string
,endButtonText:node
,onAdvance:func
,onDismiss:func
,onEnd:func
,placement:enum
'top' | 'top-start' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'left-start' | 'left' | 'left-end' | 'bottom' | 'bottom-start' | 'bottom-end',target:string
Required,title:}node
,[]
,dismissAltText:string
,enabled:bool
Required,endButtonText:node
,onBack:func
,onDismiss:func
,onEnd:func
,onEscape:func
,startingIndex:number
,tourId:}string
Required,[]
Usage Insights#
ProductTour
Project Name | Paragon Version | Instance Count | |
---|---|---|---|
frontend-app-admin-portal | 22.17.0 | 1 | |
frontend-app-discussions | 22.16.1 | 1 | |
frontend-app-learning | 22.17.0 | 1 |