About the Workspace API

The Workspace API provides methods for interacting with the Wix dashboard and editor. Each method supports a specific context: the dashboard, editor, or both. Check the documentation for each method to see where you can use it.

Setup

@wix/workspace

To use the Workspace API, install the @wix/workspace package.

Install the package

Follow the installation instructions for your development environment.

Development environmentInstallation method
Blocks appsUse the package manager.
CLI and self-hosted appsRun npm install @wix/workspace or yarn add @wix/workspace.

Import the package

To import the package in your code:

Copy

Usage

To use the package, follow the instructions below based on your development environment.

Wix sites and Wix-hosted apps

Import the relevant submodule in your code and call its methods directly.

Copy

Self-hosted apps

Create a client using the Workspace APIs.

Copy

Then use the client to call the module's methods.

Copy
Did this help?