Dashboard beta

Render a panel

Render a panel surface as part of your app.

A panel view is a narrow, persistent column that opens between the dock and the window. It is the same surface Notifications and Content Agent use, so a panel can sit alongside whichever app is in the window, not just your own.

Each panel view gets its own item in the Dashboard dock. Selecting the item opens the panel, and selecting it again closes it. An app can declare several panel views, but only one panel is open at a time.

Beta API

Declare the panel

src is relative to the project root, the folder that contains sanity.cli.ts. The panel's name must be unique across the app's views and web workers.

Wrap the panel in providers

Each panel renders in its own island, so it doesn't inherit the Dashboard's context or providers. Wrap it in SanityApp, the same provider your app's window uses:

Export the panel

The Dashboard shows the title component in the panel header, next to a close button, and the panel component in the body. Both receive view, which contains the view's name and title. Each component renders in its own island, so wrap any component that uses App SDK hooks in Providers. The title here only returns view.title, so it doesn't need them.

Panel size

The panel opens 400 pixels wide beside the current app. Users can resize it from 280 pixels up to half the window width. On narrow screens, the panel fills the width.

Next steps

Was this page helpful?