For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
        • Get variable mode name
        • Set variable mode name
        • Get variable mode breakpoint
        • Set variable mode breakpoint
  • Assets
  • Pages & Folders
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • mode.setName(name)
Variables & CollectionsVariable ModesManaging Variable Modes

Set variable mode name

Was this page helpful?
Previous

Get variable mode breakpoint

Next
Built with

mode.setName(name)

Set the name of a variable mode. Variable mode names must be unique within a collection.

Syntax

1mode.setName(name: string): Promise<null>

Parameters

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

Returns

Promise<null>

A Promise that resolves to null.

Example

1// Get Collection
2const collection = await webflow.getDefaultVariableCollection()
3
4// Get Variable Mode
5const variableMode = await collection?.getVariableModeByName(modeName)
6
7// Set Variable Mode Name
8variableMode?.setName("My Variable Mode")

Try this example

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canModifyVariablesAnyMainCanvasDesign