Logo
Logo

Variables

Variables let you reuse colors, spacing values, font families, and other values throughout a site. Change the variable once and every style that uses it receives the new value.

Breakdance outputs variables as CSS custom properties and makes them available in compatible style controls.

Open the Variables panel

Click the three-dot menu in the builder’s top bar, then choose Variables.

Variables are organized into collections. Collections only organize the panel; they do not change how a variable works on the page.

Create a variable

  1. Click Add new collection and name the collection.
  2. Click Add Variable inside the collection.
  3. Choose the variable type.
  4. Name the variable and enter its value.

Breakdance includes five variable types:

  • Color
  • Number
  • Unit
  • Font Family
  • Image URL

The type controls where the variable can be used. For example, a Color control lists Color variables rather than variables created for unrelated value types.

Use a variable in a selector

Open a selector and find the style control you want to connect. Click the variable button beside that control, then choose a variable in the Variables popup.

The control now uses the variable instead of a value stored directly on the selector. You can reopen the popup to choose another variable. The popup also includes an option to create a variable without leaving the control you are editing.

Override a variable on part of a page

You can replace a variable’s value on one element and its contents without changing the global definition.

  1. Select the element where the override should begin.
  2. Open the element’s Settings tab.
  3. Open Override Variables.
  4. Click Add Variable, choose the variable, and enter the replacement value.

Breakdance writes the override on the selected element. Elements inside it inherit that value unless a closer descendant sets another override.

Manage variables

The Variables panel lets you search, rename, reorder, and delete variables and collections. You can also copy a variable’s CSS name, review variable history, and import or export variables. An import can merge with the current variables or replace them.

Meet Breakdance: The Best Visual Builder for WordPress
faces
Join thousands of freelancers and agencies who are working better and faster using Breakdance