Get Theme (Beta)

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}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny