Skip to content

Sanity Plugins

The Studio uses these plugins (configured in packages/sanity/src/index.ts): Media, Singleton Management, Tags, User Select, and References. The Structure tool also uses the References view.

Package: sanity-plugin-media
Version: ^4.1.1
Plugin: media()

The Sanity Media Browser plugin provides an enhanced media management interface for handling images, videos, and other media assets in your Sanity Studio.

  • Improved media library browsing experience
  • Better organization and search capabilities for media assets
  • Enhanced media upload and management workflows
  • Support for various media types and formats

The plugin is automatically configured in the Sanity Studio configuration:

import {media} from 'sanity-plugin-media'
export default defineConfig({
plugins: [media()],
})

Official plugin documentation.


Package: sanity-plugin-tags-v4
Version: ^1.0.3
Plugin: tags()

Provides a tags field type for taxonomy and keywords. Used on Settings (keywords) and Page (keywords) with includeFromRelated: 'keywords' for shared tag suggestions.

Plugin on npm.


Package: sanity-plugin-user-select-input
Version: ^2.0.1
Plugin: userSelect()

Adds a userSelect field type to reference Sanity users. Used on Page for createdBy and lastModifiedBy.

Plugin on npm.


Package: sanity-plugin-references
Version: ^1.0.1
Plugins: references(), referencesView(S)

Adds reference exploration and a References view per document. The Structure tool is configured so each document opens with Form + References view:

structureTool({
defaultDocumentNode: (S) =>
S.document().views([S.view.form(), referencesView(S)]),
}),
references(),

Plugin on npm.


Package: sanity-plugin-singleton-management
Version: ^1.0.6
Plugin: singletonTools()

The Singleton Management plugin provides tools and utilities for managing singleton documents in Sanity. Singleton documents are unique documents that should only exist once in your dataset.

  • Automatic singleton document management
  • Prevents duplicate singleton documents
  • Simplified singleton document creation and editing
  • Better UX for singleton document types

The plugin is configured in the Sanity Studio:

import {singletonTools} from 'sanity-plugin-singleton-management'
export default defineConfig({
plugins: [singletonTools()],
})
  • Settings (settings): Venue info, operations, SEO & social

To mark a document as a singleton, add the singleton: true option in the document type definition:

export const settings = defineType({
name: 'settings',
type: 'document',
options: {
singleton: true,
},
// ... fields
})

For more information, visit the official plugin documentation.


The Structure Tool (structureTool()) is Sanity’s default document structure and navigation interface. It provides:

  • Document type navigation
  • Document listing and filtering
  • Default document management interface

The Vision Tool (visionTool()) provides a GROQ query interface for:

  • Testing GROQ queries
  • Exploring your dataset
  • Debugging queries
  • Learning GROQ syntax

Access it from the Sanity Studio toolbar to write and test queries against your dataset.


  1. Install in the Sanity package: pnpm add <plugin-package-name> --filter @repo/sanity
  2. Import and add to the plugins array in packages/sanity/src/index.ts.
  3. Document the plugin on this page.