XState is available as an npm package. You can install it using your preferred package manager.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/statelyai/xstate/llms.txt
Use this file to discover all available pages before exploring further.
Install XState
Framework-specific packages
XState provides official integrations for popular frameworks:React
Vue
Svelte
Solid
Templates
Get started quickly by forking one of these templates:XState Template
TypeScript template with no framework
XState + React
React + TypeScript template
XState + Vue
Vue + TypeScript template
XState + Svelte
Svelte + TypeScript template
Requirements
XState has zero dependencies and works in any JavaScript environment:- Node.js - Version 14 or higher
- Browsers - All modern browsers (Chrome, Firefox, Safari, Edge)
- TypeScript - Version 5.0 or higher (optional but recommended)
Verify installation
You can verify that XState is installed correctly by importing it:Next steps
Quick start
Build your first state machine
Core concepts
Learn the fundamentals