Remove variable mode

mode.remove()

Remove a variable mode from a collection

Syntax

mode.remove(): Promise<boolean>

Returns

Promise<boolean>

A Promise that resolves to boolean.

Example

// Get Collection
const collection = await webflow.getDefaultVariableCollection()
// Get Variable Mode
const variableMode = await collection?.getVariableModeByName(modeName)
// Remove Variable Mode
variableMode?.remove()

The base mode can’t be removed. Calling remove() on a collection’s base mode rejects with a VariableModeInvalid error, so guard against it when removing modes programmatically.

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canModifyVariablesAnyMainCanvasDesign