Get variable mode by name

collection.getVariableModeByName(string: modeName)

Get a variable mode by its name.

Syntax

collection.getVariableModeByName(modeName: string): Promise<VariableMode>

Parameters

  • modeName: string - The name of the variable mode to get.

Returns

Promise<VariableMode>

A Promise that resolves to a variable mode object.

Example

// Get Collection
const collection = await webflow.getDefaultVariableCollection()
// Get Variable Mode by Name
const variableMode = await collection.getVariableModeByName(modeName)
console.log(variableMode)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadVariablesAnyAnyAnyAny