Get started
Get started quickly with XState and Stately Studio.
Quick start
Start here to jump straight into XState and Stately Studio.
Install XState
XState has zero dependencies and runs anywhere that JavaScript runs. You can install XState using your favorite package manager, like npm, pnpm, or yarn.
Migrate to XState v5
The guide below explains how to migrate from XState version 4 to version 5. Migrating from XState v4 to v5 should be a straightforward process. If you get stuck or have any questions, please reach out to the Stately team on our Discord.
Examples
XState v5 examples are also available in the /examples directory. Many of the examples have a CodeSandbox link where you can run the example in your browser.
Templates
XState runs anywhere you can run JavaScript and is framework-agnostic.
Cheatsheet
Use this cheatsheet to quickly look up the syntax for XState v5.
TypeScript
XState v5 and its related libraries are written in TypeScript, and utilize complex types to provide the best type safety and inference possible for you.
API