Skip to content

States

A state describes the machine’s status or mode, which could be as simple as Paused and Playing. A state machine can only be in one state at a time.

Video player state machine with an initial Paused state and a Playing state. There’s a warning on the playing state because there’s no transitions which means the playing state cannot be reached.Video player state machine with an initial Paused state and a Playing state. There’s a warning on the playing state because there’s no transitions which means the playing state cannot be reached.

View this machine in the Stately Studio.

These states are “finite”; the machine can only move through the states you’ve pre-defined.

Create a state

  1. Select your machine or an existing state.
  2. Create a new state inside your machine or existing state:
    • Use the + State button that appears above the selected state, or:
    • Drag from the handles on the left, right and bottom sides of the selected state, and release to create a connecting transition, event and new state.
    • Double-click inside your machine or an existing state.