Studio

Workspaces

Learn about working with multiple workspaces within a single studio setup

Sanity Studio can accommodate multiple workspaces, each with its very own configuration. To set up a studio with more than one workspace, simply supply an array of configurations to defineConfig instead of a single config object.

The studio will pick up your new workspace and display a dropdown next to the studio title in the navbar to let you quickly switch between workspaces.

Loading...

Workspace configuration properties

Studio configurations and workspace configurations are the same thing. We refer to them as studio configs when there's only one configuration, and as workspace configs when there are multiple configurations.

In practice, all configuration properties are workspace configuration properties. There are a few properties that, while legal and valid also for single workspaces, don't have actual value outside the context of a multi-workspace setup. For more information, see this reference article.

Hiding workspaces

The hidden property on a workspace configuration controls whether that workspace is visible in the workspace menu and chooser. When hidden evaluates to true, the workspace is removed from the workspace menu and workspace chooser, and direct URL navigation to it shows a not-found screen. The property accepts either a boolean or a callback that receives {currentUser}.

Gotcha

Before authentication resolves, currentUser is null. Callbacks should handle this case explicitly, as shown above, to avoid hiding the workspace before the user's identity is known.

Was this page helpful?