Product Tours
Product Tours can help guide users through a product flow or a specific feature
Preview
An example of a <FrigadeTour/> tooltip
Setup Guide
Check out our guide on how to create your first product tour in just a few minutes.
Code
config.yml props
The following props are available in config.yml
in the steps
array:
React component props
- appearance
- className
- customStepTypes
- customVariables
- dismissBehavior
- dismissible
- hideOnFlowCompletion
- offset
- onButtonClick
- onComplete
- onDismiss
- onStepCompletion
- primaryColor
- showHighlight
- showHighlightOnly
- showStepCount
- showTooltipsSimultaneously
- skipIfNotFound
- style
- tooltipPosition
- visible
appearance
Optional
appearance: Appearance
className
Optional
className: string
customStepTypes
Optional
customStepTypes: Record
<string
, (props
: `primaryColor:
string;
stepData:
StepData }) =>
ReactNode`>
customVariables
Optional
customVariables: Object
Index signature
▪ [key: string
]: string
| number
| boolean
dismissBehavior
Optional
dismissBehavior: "skip-flow"
| "complete-step"
skip-flow
(default): Completes the entire flow/tour when a single tooltip is dismissed.
complete-step
: Completes the current step when a tooltip is dismissed. The user can continue in the tour.
dismissible
Optional
dismissible: boolean
Shows a close button in the top right corner of the tooltip. Depending on dismissBehavior, it will either end the entire flow or just the current step.
hideOnFlowCompletion
Optional
hideOnFlowCompletion: boolean
offset
Optional
offset: Object
Offset to apply to all tooltips. If you only wish to apply an offset to a single tooltip you can use props.offset
in the config.yml instead.
x | number |
y | number |
onButtonClick
Optional
onButtonClick: (step
: StepData
, index?
: number
, cta?
: "primary"
| "secondary"
| "link"
| "back"
| "collapse"
| "expand"
, nextStep?
: StepData
) => boolean
Handler for when a primary or secondary CTA is clicked (regardless if step is completed or not). Return true if your app performs an action (e.g. open other modal or page transition).
Parameters
Name | Type |
---|---|
step | StepData |
index? | number |
cta? | "primary" | "secondary" | "link" | "back" | "collapse" | "expand" |
nextStep? | StepData |
Returns
boolean
onComplete
Optional
onComplete: () => void
Returns
void
onDismiss
Optional
onDismiss: () => void
Returns
void
onStepCompletion
Optional
onStepCompletion: (step
: StepData
, index
: number
, nextStep?
: StepData
, allFormData?
: any
, stepSpecificFormData?
: any
) => boolean
Handler for when a step is completed.
Parameters
Name | Type | Description |
---|---|---|
step | StepData | |
index | number | |
nextStep? | StepData | |
allFormData? | any | All form data collected so far (only applicable to FrigadeForms) |
stepSpecificFormData? | any | Form data collected for the finished step (only applicable to FrigadeForms) |
Returns
boolean
primaryColor
Optional
primaryColor: string
showHighlight
Optional
showHighlight: boolean
Whether to show the highlight (the small circle/ping) or not. Defaults to true.
showHighlightOnly
Optional
showHighlightOnly: boolean
If true, the tooltip will only show the highlight and not the tooltip itself. Clicking the highlight will reveal it.
showStepCount
Optional
showStepCount: boolean
If true, a step counter will show up in the tooltip.
showTooltipsSimultaneously
Optional
showTooltipsSimultaneously: boolean
Whether to show more than one tooltip at a time. Defaults to false.
skipIfNotFound
Optional
skipIfNotFound: boolean
If true, the tour will go to the next existing step/tip if the current selector element is not found on the page. Be careful with this, as it can lead to unexpected behavior of tooltip ordering if the selector is slow to load on the page. Defaults to false.
style
Optional
style: CSSProperties
tooltipPosition
Optional
tooltipPosition: ToolTipPosition
visible
Optional
visible: boolean