> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Set variable mode breakpoint

> Learn how to set the breakpoint that drives a variable mode.

## `mode.setBreakpoint(breakpointId)`

Set the [breakpoint](https://help.webflow.com/hc/en-us/articles/33961300305811) that drives a variable mode. Use this method to promote a manual mode to an automatic mode, move an automatic mode to a different breakpoint, or demote an automatic mode back to a manual mode.

* Pass a `BreakpointId` to drive the mode automatically at the matching screen size.
* Pass `null` to demote the mode to a manual mode.

#

### Syntax

```typescript
mode.setBreakpoint(breakpointId: BreakpointId | null): Promise<null>
```

### Parameters

* **breakpointId**: *BreakpointId | null* - The breakpoint to bind to the mode: `"xxl" | "xl" | "large" | "main" | "medium" | "small" | "tiny"`. Pass `null` to demote the mode to a manual mode.

### Returns

**Promise\<*null*>**

A Promise that resolves to null once the breakpoint association is saved.

#

### Example

```typescript
// Get Collection
const collection = await webflow.getDefaultVariableCollection()

// Get Variable Mode
const variableMode = await collection?.getVariableModeByName(modeName)

try {
  // Promote a manual mode to automatic, or move it to a different breakpoint
  await variableMode?.setBreakpoint("small")

  // Demote the mode back to a manual mode
  await variableMode?.setBreakpoint(null)
} catch (err) {
  if (err.cause?.tag === "VariableModeInvalid") {
    // The breakpoint is already used by another mode, not enabled on the site, or invalid
    console.warn(err.message)
  } else {
    throw err
  }
}
```

[Try this example](https://webflow.com/oauth/authorize?response_type=code\&client_id=19511de1ec410f9228d8dcbc9420e67916dea80d86d18f0c9a533eb475ea0f62)

> **Warning**
>
> A `setBreakpoint` call rejects with a `VariableModeInvalid` error when:
>
> * **The breakpoint is already in use.** Each breakpoint can drive only one automatic mode per collection, including the implicit base mode (`Breakpoint "X" is already used by mode "Y"`).
> * **The breakpoint isn't enabled on the site** (`Breakpoint "X" is not enabled on this site`).
> * **The breakpoint ID is invalid** (`"X" is not a valid BreakpointId`).
>
> Catch these errors to recover gracefully and surface the message to the user.

### Designer Ability

| Designer Ability       | Locale | Branch | Workflow | Sitemode |
| :--------------------- | :----- | :----- | :------- | :------- |
| **canModifyVariables** | Any    | Main   | Canvas   | Design   |