Conditional & branching

Not every user should see every step. Steps can be gated by a condition, tours can fork on an answer, and Back walks the path the user actually took rather than the order the steps were declared in.

Conditional steps

The billing step only appears for an administrator, and the progress indicator counts only the steps that will actually be shown. Change the role and run the tour again.

Active projects
12
Usage this month
68%
Team members
7

Branching on an answer

Footer buttons carry an effect. Combined with BonboardingStepActionEffect.GoTo this is the whole of a branching tour: no state machine to write.

new BonboardingStepDefinition
{
    Id = "ask",
    Title = "What brings you here?",
    ShowNext = false,
    Actions =
    [
        new BonboardingStepAction
        {
            Label = "I design",
            Style = BonboardingStepActionStyle.Primary,
            Effect = BonboardingStepActionEffect.GoTo,
            TargetStepId = "design",
        },
        new BonboardingStepAction
        {
            Label = "I build",
            Style = BonboardingStepActionStyle.Primary,
            Effect = BonboardingStepActionEffect.GoTo,
            TargetStepId = "build",
        },
    ],
}

Validation before advancing

CanAdvance blocks the forward button until the step is satisfied. Here the tour will not move on until the field contains something.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.