Set variable mode on a style
style.setVariableMode(collection, mode, options?)
Apply a variable mode to a style. Each variable mode belongs to a variable collection. To apply a variable mode, you must provide the variable collection that belongs to the variable mode.
Syntax
Parameters
-
collection: VariableCollection - The variable collection that belongs to the variable mode.
-
mode: VariableMode - The variable mode to set.
-
options?: BreakpointAndPseudo - An object that lets you filter properties by breakpoint and/or pseudo-state. (Optional)
-
BreakpointId: Identifies the responsive breakpoint to get styles for. -
PseudoStateKey: Specifies a CSS pseudo-class to get styles for.
-
Returns
Promise<null>
A Promise that resolves to null.