getStyleDefinitions()

Retrieves the style definitions declared in the selected component's manifest, including cssProperties and cssCustomProperties.

Syntax

Copy

Returns

Promise<ElementStyleDefinitions>

PropertyTypeDescription
cssPropertiesobjectDefinitions for each declared CSS property, keyed by property name.
cssCustomPropertiesobjectDefinitions for each declared CSS custom property, keyed by property name.

Each definition can include:

PropertyTypeDescription
displayNamestringThe label for the property in auto panels.
defaultValuestringThe default value declared in the manifest.
statesDefaultValuesobjectDefault values for this property in each declared state, keyed by state key.
cssPropertyTypestringFor cssCustomProperties only: the control type the property renders as, such as 'color'.

Example

Copy

See also

Last updated: 8 September 2026

Did this help?