Core Examples
All headless examples live under:
packages/core/examples
Minimal
| Example | Purpose |
|---|---|
simple-flow.flow.ts | Minimal linear next -> next -> submit flow |
simple-back.flow.ts | Basic HISTORY_TARGET back behavior |
simple-sequence.flow.ts | Tiny sequence model |
go-to-jump.flow.ts | Programmatic goTo jumps |
Feature-Focused
| Example | Purpose |
|---|---|
conditional-skip.flow.ts | Optional step routing |
first-match-wins.flow.ts | Transition priority behavior |
custom-event.flow.ts | Custom events with send |
async-guard.flow.ts | Async when validation |
async-effect.flow.ts | Async effect context update |
dynamic-steps.flow.ts | Runtime graph rebuilds |
reset-on-journey-change.flow.ts | Controlled machine recreation |
confirm-close.flow.ts | Dirty-close confirmation |
history-back.flow.ts | Branch-aware back navigation |
Real Journey Scenarios
| Example | Domain |
|---|---|
group-trip.flow.ts | Group travel planning |
itinerary-builder.flow.ts | Itinerary composition |
onboarding.flow.ts | Multi-path onboarding |
checkout.flow.ts | Purchase funnel |
support-ticket.flow.ts | Support intake flow |
How to Use This Catalog
- Start from a minimal example closest to your flow.
- Layer in features (
when,effect, persistence, history policy). - Add tests around transition behavior before UI integration.