Get the current Designer mode
webflow.getCurrentMode()
Returns the name of the Designer mode that the user is currently in.
Use this method to read the active mode on demand, such as when your extension launches or before an action runs.
To react to mode changes as they happen, use webflow.subscribe("currentappmode", callback).
To check whether the Designer is in one specific mode, use webflow.isMode().
Syntax
Returns
Promise<AppModeName | null>
A Promise that resolves to the current mode name as a string, or null when the Designer’s internal state does not map to a public mode.
The Designer exposes five public modes:
Example
Example: Adapting the UI based on mode
Read the current mode when your extension launches and render the matching UI: