getStateDefinitions()

Retrieves the states declared in the selected component's manifest, such as hover or disabled.

Syntax

Copy

Returns

Promise<ElementStateDefinitions>

An object mapping each state's key to its definition. Each definition can include:

PropertyTypeDescription
displayNamestringThe label for the state in the Design auto panel's state selector.
classNamestringThe CSS class the editor applies to preview this state.
pseudoClassstringThe native CSS pseudo-class this state maps to on the live site, such as 'hover', 'focus', 'disabled', or 'invalid'.
propsobjectThe props the editor passes to the component to preview this state.

Example

Copy

See also

Last updated: 8 September 2026

Did this help?