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
        • Create variable collection
        • Get all variable collections
        • Get default variable collection
        • Get variable collection by ID
        • Remove variable collection
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • webflow.createVariableCollection(collectionName)
Variables & CollectionsVariable CollectionsCreating & Retrieving Variable Collections

Create a variable collection

Was this page helpful?
Previous

Get all variable collections

Next
Built with

webflow.createVariableCollection(collectionName)

Creates a new variable collection with the given name.

Syntax

1webflow.createVariableCollection(collectionName: string)

Parameters

  • collectionName: string - The name of the variable collection to create.

Returns

Promise<VariableCollection>

The newly created collection object.

Example

1const collection = webflow.createVariableCollection("My Collection");
2
3// returns a collection object
4// {"id": "collection-4a393cee-14d6-d927-f2af-44169031a25b"}

Try this example

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canModifyVariablesAnyMainCanvasDesign