Search...
id
Gets the state's ID.
Description
The ID is the state's unique identifier. It is used when selecting
the state using the $w()
function.
An state's id
is set in the Editor using the Properties panel.
To set the state id
:
- Click the multi-state box.
- Navigate to the state you want to edit.
- Edit the STATE ID field in the Properties panel.
Type:
stringRead Only
Was this helpful?
Get the current state and its ID
Copy Code
1let state = $w("#myStatebox").currentState;23let stateId = state.id; // "state1"