Tour
Guide users through a specific product flow or feature
Setup Guide
Check out our guide on how to create your first product tour in just a few minutes.
Code
Flow Configuration
The following props are available in the YAML Config defined in the Frigade Dashboard:
Possible values:
false
, flow.back
, flow.complete
, flow.forward
, flow.restart
, flow.skip
, flow.start
, step.complete
, step.skip
, step.reset
, step.start
primaryButton.title
instead. The title of the primary buttonprimaryButton.uri
instead. The url to open when the primary button is clickedprimaryButton.target
instead. The target of the primary button url (default: _blank; use _self to open in the same window). Setting it to # will open the existing page and dismiss any Frigade modals.Possible values:
false
, flow.back
, flow.complete
, flow.forward
, flow.restart
, flow.skip
, flow.start
, step.complete
, step.skip
, step.reset
, step.start
secondaryButton.title
instead. The title of the secondary buttonsecondaryButton.uri
instead. The url to open when the secondary button is clickedsecondaryButton.target
instead. The target of the secondary button url (default: _blank; use _self to open in the same window). Setting it to # will open the existing page and dismiss any Frigade modals.React Component Props
align
Optional
align: AlignValue
The alignment of the tooltip relative to the anchor.
Possible values: after
, before
, center
, end
, start
.
alignOffset
Optional
alignOffset: number
The offset of the tooltip relative to the anchor along the alignment axis.
as
Optional
as: ElementType
<any
, keyof IntrinsicElements
>
Optional component to wrap the child components in, e.g. as={Dialog}
will render the Flow in a modal Dialog. Defaults to Box
.
autoScroll
Optional
autoScroll: boolean
Automatically scroll to the anchor element of the current Step
container
Optional
container: string
| Element
| DocumentFragment
Specify a container in the DOM render the Tour into. Use this to render the Tour into a different container/scrollable ancestor.
css
Optional
css: Interpolation
<Theme
>
Emotion CSS prop to apply to the component. See Theming documentation for more information.
Example usage:
defaultOpen
Optional
defaultOpen: boolean
Whether the tooltip should be open by default.
dismissible
Optional
dismissible: boolean
Whether the Flow is dismissible or not
flowId
flowId: string
The Flow ID to render. You can find the Flow ID in the Frigade dashboard.
forceMount
Optional
forceMount: boolean
If true, the Flow will be mounted even if it has already been completed or dismissed. However, if the user does not match the Flow’s targeting, the Flow will not be mounted.
modal
Optional
modal: boolean
Whether to render a modal overlay behind the tooltip.
onComplete
Optional
onComplete: FlowHandlerProp
Handler for when the Flow is completed. This is event is fired immediately after the user completes the Flow.
onDismiss
Optional
onDismiss: FlowHandlerProp
Handler for when the Flow is dismissed (skipped). This is event is fired immediately after the user dismisses the Flow.
onOpenChange
Optional
onOpenChange: (open
: boolean
) => void
Callback function triggered when the open state of the tooltip changes.
Parameters
Name | Type |
---|---|
open | boolean |
Returns
void
onPrimary
Optional
onPrimary: StepHandlerProp
Handler for when primary button is clicked.
If this function a promise that evaluates to false
, the step will not be automatically completed when clicked.
onSecondary
Optional
onSecondary: StepHandlerProp
Handler for when secondary button is clicked.
If this function a promise that evaluates to false
, the step will not be automatically completed when clicked.
open
Optional
open: boolean
Controls the open state of the tooltip. Use this for controlled components.
sequential
Optional
sequential: boolean
Whether the Tour should be completed by the end-user in sequential order.
If false
, all steps will be rendered at once.
Defaults to true
, which means only one step will be rendered at a time in sequential order.
side
Optional
side: SideValue
The preferred side of the anchor to render the tooltip.
Possible values: top
, right
, bottom
, left
.
sideOffset
Optional
sideOffset: number
The distance in pixels from the tooltip to the anchor element.
spotlight
Optional
spotlight: boolean
Whether to highlight the anchor element with a spotlight/scrim effect.
variables
Optional
variables: Record
<string
, unknown
>
Variables to pass to the Flow. You can use variables in the Flow configuration to customize copy.
For instance, you can use title: Hello, ${name}!
in the Flow configuration and pass variables={{name: 'John'}}
to customize the copy.