OnboardingConditional display
Conditional steps allow you to show or hide steps dynamically based on answers given earlier in the onboarding flow.
This is how you create branching logic without writing code.
The display_condition property
Every step can define a display_condition.
If the condition evaluates to false, the step is skipped automatically.
The condition is evaluated using the current userData.
Basic idea
A conditional step answers the question:
“Should this step be displayed, given what the user has already answered?”
If yes → the step is rendered
If no → the step is skipped
Simple example
tsx
This step is only shown if: userData.experience_level === "advanced"
Supported condition patterns
Equals
Show the step if a previous value matches exactly.
tsx
Includes (multi-select)
Useful for multi-select steps.
tsx
Shown if: userData.features includes "payments"
Not equals
tsx
Combining conditions
Conditions are intentionally simple and predictable.
If you need:
- Multiple conditions
- Complex logic
- Derived values
You should handle this with a custom step instead of overloading config logic.
Common use cases
- Beginner vs advanced flows
- Feature-specific questions
- Optional personalization steps
- Skipping irrelevant questions
What happens to skipped steps
- Skipped steps are not rendered
- Their
propertyis never written touserData - Navigation remains smooth and linear
You do not need to handle edge cases manually.
Best practices
- Keep conditions easy to read
- Base conditions only on previous steps
- Avoid deep branching trees
- Prefer fewer, meaningful branches over many small ones
