UX Glossary Interaction Design

State Machine

Interaction Design

A model that defines all possible conditions of a UI component or flow — its states, the events that trigger transitions between them, and the actions that occur during those transitions. Designing with a state machine mindset prevents undefined states from appearing in the implemented product and forces explicit decisions about every possible scenario, including error and loading states.

State Machine illustration
Source: upload.wikimedia.org

Common contexts

Use when

Apply state machine thinking when designing any component or flow with more than two distinct conditions — buttons, forms, data-fetching interfaces, and multi-step wizards where undefined states will surface as bugs in production.

Avoid when

Don't produce formal state diagrams for simple, static UI elements with a single visible state — the overhead of full state modelling is wasted on a decorative banner or a read-only label that never changes.

Every bug report that starts with 'it works fine but sometimes...' is a missing state — the state machine discipline of asking 'what happens when X is true and Y is also true' catches the edge cases that user stories and happy-path designs systematically miss.

Real-world examples

Related terms

Component State Animation (UI) Interaction Design (IxD) Loading State Feedback
← Browse all UX Glossary terms