Canvas

Configure Canvas for your content

Make your Studio schema available in Canvas and configure how it surfaces to writers.

This guide is for developers and Sanity Studio maintainers. It covers how to deploy your schema so Canvas can access it, and how to tailor which content types and fields are available.

For a conceptual overview of how Canvas works and where it fits into your content workflow, see Canvas. For the writer-facing guide to structuring content and sending it to Studio, see Structuring content for Studio.

Prerequisites

Required packages and versions

Make sure your project is updated to v3.88.1 or later of Sanity Studio. @latest is always recommended.

Permissions

  • Writers need read access to the destination studio and permissions for relevant content types to set a content type on a Canvas document.
  • Once set, anyone with access to the Canvas document can work with field labels, even without studio access.
  • The @ content reference shortcut requires read access to the connected studio.
  • The Send to Studio feature requires edit permissions for the relevant studio.

Enabling Canvas for your project

Canvas can work with any deployed Studio schema. Once your schema is deployed to your dataset, all content types in that schema are automatically available to Canvas users who have access to the studio.

For Sanity-hosted studios:

  • Make sure your project is updated to v3.88.1 or later of Sanity Studio.
  • Deploy your Studio by running npx sanity deploy.

If your Studio is embedded or self-hosted, see Set up and configure Dashboard for onboarding instructions. For more details on how schema deployment works, see Schema deployment.

No additional configuration is needed to make your schema available in Canvas. The options.canvasApp configuration described below is optional and only needed if you want to exclude specific types or fields, or provide additional context to the labeling AI.

Configuring schemas for Canvas

To tailor how Canvas handles your Studio schema, use the options.canvasApp configuration available on all schema types. This lets you:

  • Exclude specific types or fields from appearing in Canvas using options.canvasApp.exclude.
  • Provide additional context about the intended purpose of a type or field using options.canvasApp.purpose.

Protip

Be particularly diligent with your exclusions for schemas that are very large, have a high number of types, are recursive (self-referencing), or have big arrays of several different types.

Controlling field visibility

To prevent a document type from being selectable in Canvas, set the exclude option to true:

Similarly, you can exclude specific fields within a document type by setting options.canvasApp.exclude to true on the field:

In this example, the article type is still available in Canvas, but the internalNotes field is not shown or available for field labeling.

Validation

Validation rules like character limits are shown in Canvas when action is needed to add or correct invalid content. Custom validation rules cannot be shown in Canvas.

Field descriptions and validation

Field descriptions and validation rules from your schema are surfaced in Canvas. The guidance your team would typically maintain separately (content requirements, formatting expectations, character limits) is pulled from your schema and can be displayed where writers need it.

Loading...

To make the most of this, write clear, writer-friendly descriptions on your schema fields. Think of them as inline instructions for the person writing the content, not just documentation for developers.

Adding context with purpose

The options.canvasApp.purpose option lets you provide additional context about the intended purpose or usage of a specific type or field. This can help automated labeling make more accurate decisions when mapping content to fields.

For example, if you have a tags field in your schema that's intended specifically for SEO keywords rather than general content categorization, you can clarify this using the purpose option:

Consider using the purpose option when added clarity would be helpful. Often, automatic labeling will get it right, so give it a try first and add purpose details only if needed to refine the results.

Schema design tips for Canvas

When designing schemas that will be used with Canvas, keep the following in mind:

  • Write clear, writer-friendly field descriptions. These surface directly to writers as inline guidance.
  • Exclude fields that writers don't need to interact with (internal metadata, computed fields, system fields).
  • Use the purpose option sparingly and only where automated labeling needs a nudge.
  • Keep schema complexity manageable. Very large schemas with deeply nested structures can be harder for both writers and automated labeling to work with.

Troubleshooting

Can't find your project in Canvas?

Make sure your Studio has been deployed with a recent version of Sanity Studio (v3.88.1 or later). Canvas reads your schema from the deployed Studio. If your Studio is embedded or self-hosted, make sure it has been onboarded to Dashboard.

Content type is missing fields

Check that the missing fields aren't configured with options.canvasApp.exclude: true. Also confirm that the Studio has been redeployed since the fields were added to your schema.

Automated labeling is mapping content incorrectly

Try adding a purpose option to the fields where labeling is off. Clear, specific purpose descriptions help the AI make better mapping decisions. If a field is consistently mislabeled, check that its field name and description are unambiguous.

If you're a writer seeing Canvas behave unexpectedly, see Troubleshooting Canvas.

Was this page helpful?