Set variable value
variable.set(value, options?)
Set the value of the selected variable.
General Syntax
Parameters
-
value:
VariableValue
|Variable
|CustomValue
- The value to set for the variable. The value must match the variable’s type (e.g., a color variable requires a color value, a size variable requires a size value). You can also pass a Variable object to create a referenced variable or a CustomValue to set a custom value for the variable.Color
Size
Number & Percentage
FontFamily
CustomValue
-
options:
{mode: VariableMode}
- An optional parameter to set the mode value of the variable.
Returns
Promise<null
>
A Promise that resolves to null