Adding the dashboard tool to a Sanity configuration in version 3.
Congrats on migrating to Sanity v3! Adding the dashboard tool to your config is pretty straightforward, though there's something important to note about how things work in v3.
In Sanity Studio v3, the configuration structure has changed from v2. The dashboard tool is now added through the plugin system in your sanity.config.ts or sanity.config.js file.
Here's how to add the dashboard tool:
1. Install the dashboard plugin:
npm install @sanity/dashboard2. Add it to your studio configuration:
import {defineConfig} from 'sanity'
import {dashboardTool} from '@sanity/dashboard'
export default defineConfig({
// ... your other config
plugins: [
dashboardTool({
widgets: [
// Add your widgets here
]
}),
// ... other plugins
],
})3. Add widgets to your dashboard (optional but recommended):
The dashboard tool supports various widgets like projectInfo and projectUsers. Here's an example with some common widgets:
import {defineConfig} from 'sanity'
import {dashboardTool} from '@sanity/dashboard'
import {projectInfoWidget} from '@sanity/dashboard'
import {projectUsersWidget} from '@sanity/dashboard'
export default defineConfig({
// ... your other config
plugins: [
dashboardTool({
widgets: [
projectInfoWidget(),
projectUsersWidget()
]
}),
],
})Important note: There's also a newer organizational Dashboard that's separate from the Studio dashboard plugin. The organizational Dashboard is the hub for your organization's content operations and shows deployed studios and apps. The @sanity/dashboard plugin is specifically for adding a dashboard view within your Studio itself.
For the Studio plugin, you can find available dashboard widgets on the Sanity Exchange to customize your dashboard further. The main difference from v2 is that you now use the dashboardTool function in the plugins array instead of the old parts system.
Sanity β Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.