JavaScript and TypeScript finite state machines and statecharts for the modern web.
💙 Explore our catalogue of examples
🖥 Download our VS Code extension
📑 Adheres to the SCXML specification
💬 Chat on the Stately Discord Community
Packages
- 🤖
xstate
- Core finite state machine and statecharts library + interpreter - 🔬
@xstate/fsm
- Minimal finite state machine library - 📉
@xstate/graph
- Graph traversal utilities for XState - ⚛️
@xstate/react
- React hooks and utilities for using XState in React applications - 💚
@xstate/vue
- Vue composition functions and utilities for using XState in Vue applications - 🎷
@xstate/svelte
- Svelte utilities for using XState in Svelte applications - ✅
@xstate/test
- Model-Based-Testing utilities (using XState) for testing any software - 🔍
@xstate/inspect
- Inspection utilities for XState
Templates
Get started by forking one of these templates on CodeSandbox:
- XState Template - no framework
- XState + TypeScript Template - no framework
- XState + React Template
- XState + React + TypeScript Template
- XState + Vue Template
- XState + Vue 3 Template
- XState + Svelte Template
Visualize, simulate, inspect, and share your statecharts in XState Viz