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
  • Assets
  • Pages & Folders
  • Utilities
      • Get site information
      • Resize the extension
      • Close the extension
      • Get the current breakpoint
      • Get user ID token
      • Get user's Designer capabilities
      • Get the current Designer mode
      • Check for a Designer mode
      • Get the Designer's pseudo-state
      • Get launch context
      • Get app subscriptions
      • Get theme
      • Get theme styles
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • webflow.getTheme()
  • Syntax
  • Returns
  • Example
  • Designer Ability
UtilitiesSite Information & Settings

Get Theme (Beta)

Was this page helpful?
Previous

Get Theme Styles (Beta)

Next
Built with

webflow.getTheme()

Returns the currently active Designer appearance theme name.

Use this to match your extension’s UI to the Designer’s current appearance. To also receive updates when the theme changes, subscribe to the currenttheme event.

Beta

These methods are in public beta and may change with future releases.

Syntax

1webflow.getTheme(): Promise<AppearanceSettings>

Returns

Promise<AppearanceSettings>

A Promise that resolves to one of the following theme names:

ValueDescription
'darkDefault'Default dark theme
'darkDarker'Darker dark theme variant
'darkBrighter'Brighter dark theme variant
'light'Light theme

Example

1const theme = await webflow.getTheme();
2console.log('Current theme:', theme);
3
4if (theme === 'light') {
5 document.body.classList.add('light-mode');
6}

Try this example

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny