Skip to content
Version: XState v5

Descriptions

You can add descriptions to state and event nodes to describe their purpose and share related notes with your team. Descriptions support markdown formatting, including links and images.

You can only add one description for each state or event. The machine object will include your descriptions in the state or event’s description when you export your statecharts to JSON.

In the video player above, the text “The video player should be in full-screen mode” is a description of the Opened event.

Add a description to a state, event, or transition

Use the plus icon button and choose Description from the menu to add a description block to your selected state, event, or transition.

You can also add descriptions from the Details panel in the right tool menu.

Delete a description from a state, event, or transition

Select the state, event, or transition whose description you want to delete, open the Details panel, and delete the contents of the description text area.