How to set title for singleton document without title field in Studio v3?

8 replies
Last updated: Jan 17, 2026
I'm trying to title a singleton document in the document editor panel in studio v3. For example, I have a Settings singleton document but it doesn't have a "title" field in the actual form, as it's settings, not content. I would like to have the editor panel display a title other than "Untitled".
I have tried adding
.title('Settings')
in the desk structure definition, which hasn't made a difference. I've also tried exporting a default document node for just this
schemaType
, but this too doesn't seem to be making a difference.
Any suggestions would be greatly appreciated!
AI Update

Perfect! I found the exact answer to your question. The solution is to use the preview configuration in your schema, not in the structure definition.

For singleton documents without a title field, you can add a custom preview to your schema that returns a static title. Here's how to do it:

export default {
  name: 'siteSettings',
  type: 'document',
  title: 'Settings',
  preview: {
    prepare() {
      return {
        title: 'Settings'
      }
    }
  },
  fields: [
    // your fields here
  ]
}

The key insight is that the "Untitled" text in the document editor panel pulls from the preview configuration, not from the Structure Builder's .title() method. The Structure Builder's title only affects the navigation sidebar, not the document pane header.

Since your singleton doesn't have a title field to pull from, you can use the prepare() function in the preview configuration to return a hardcoded title. This changes what displays in:

  • The document pane header (where you're seeing "Untitled")
  • Document lists
  • Reference fields
  • Search results

The prepare() function doesn't need a select object if you're just returning static values. It won't write anything to your document—it only changes the display in the Studio interface, which is exactly what you want for a singleton.

This approach is particularly useful for singletons like Settings, Site Config, or other documents that don't naturally have a title field but need a meaningful display name in the Studio UI.

Show original thread
8 replies

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.

Was this answer helpful?