setStyles()

Sets style values for the selected component. Only the properties you include in values are updated. Every other property keeps its current value.

Syntax

Copy

Parameters

NameTypeDescription
values.cssPropertiesobjectCSS properties to update, keyed by property name.
values.cssCustomPropertiesobjectCSS custom properties to update, keyed by property name.

Returns

Promise<void>

Example

Copy

You can also pass the property name as a string literal instead of using the CssPropertyType enum:

Copy

See also

Last updated: 8 September 2026

Did this help?