Designer API
Control the Webflow Designer
mode.setName(name)
Set the name of a variable mode. Variable mode names must be unique within a collection.
1mode.setName(name: string): Promise<null>
Promise<null>
A Promise that resolves to null.
1// Get Collection2const collection = await webflow.getDefaultVariableCollection()34// Get Variable Mode5const variableMode = await collection?.getVariableModeByName(modeName)67// Set Variable Mode Name8variableMode?.setName("My Variable Mode")
Try this example