Skip to main content

Core Examples

All headless examples live under:

  • packages/core/examples

Minimal

ExamplePurpose
simple-flow.flow.tsMinimal linear next -> next -> submit flow
simple-back.flow.tsBasic HISTORY_TARGET back behavior
simple-sequence.flow.tsTiny sequence model
go-to-jump.flow.tsProgrammatic goTo jumps

Feature-Focused

ExamplePurpose
conditional-skip.flow.tsOptional step routing
first-match-wins.flow.tsTransition priority behavior
custom-event.flow.tsCustom events with send
async-guard.flow.tsAsync when validation
async-effect.flow.tsAsync effect context update
dynamic-steps.flow.tsRuntime graph rebuilds
reset-on-journey-change.flow.tsControlled machine recreation
confirm-close.flow.tsDirty-close confirmation
history-back.flow.tsBranch-aware back navigation

Real Journey Scenarios

ExampleDomain
group-trip.flow.tsGroup travel planning
itinerary-builder.flow.tsItinerary composition
onboarding.flow.tsMulti-path onboarding
checkout.flow.tsPurchase funnel
support-ticket.flow.tsSupport intake flow

How to Use This Catalog

  1. Start from a minimal example closest to your flow.
  2. Layer in features (when, effect, persistence, history policy).
  3. Add tests around transition behavior before UI integration.