Get variable mode name

mode.getName()

Get the name of a variable mode

Syntax

mode.getName(): Promise<string>

Returns

Promise<string>

A Promise that resolves to the name of the variable mode.

Example

// Get Collection
const collection = await webflow.getDefaultVariableCollection()
// Get Variable Mode
const variableMode = await collection?.getVariableModeById(modeId)
// Get Variable Mode Name
const name = await variableMode?.getName()
console.log(name)

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadVariablesAnyAnyAnyAny