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.
To use the Workspace API, install the @wix/workspace package.
Follow the installation instructions for your development environment.
| Development environment | Installation method |
|---|---|
| Blocks apps | Use the package manager. |
| CLI and self-hosted apps | Run npm install @wix/workspace or yarn add @wix/workspace. |
To import the package in your code:
To use the package, follow the instructions below based on your development environment.
Import the relevant submodule in your code and call its methods directly.
Create a client using the Workspace APIs.
Then use the client to call the module's methods.