Sanity Plugins
Overview
Section titled “Overview”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.
Installed Plugins
Section titled “Installed Plugins”Sanity Media Browser
Section titled “Sanity Media Browser”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.
Features
Section titled “Features”- 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()],})Documentation
Section titled “Documentation”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.
Documentation
Section titled “Documentation”User Select
Section titled “User Select”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.
Documentation
Section titled “Documentation”References
Section titled “References”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(),Documentation
Section titled “Documentation”Singleton Management
Section titled “Singleton Management”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.
Features
Section titled “Features”- 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()],})Singleton Documents in This Project
Section titled “Singleton Documents in This Project”- 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})Documentation
Section titled “Documentation”For more information, visit the official plugin documentation.
Built-in Tools
Section titled “Built-in Tools”Structure Tool
Section titled “Structure Tool”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
Vision Tool
Section titled “Vision Tool”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.
Adding New Plugins
Section titled “Adding New Plugins”- Install in the Sanity package:
pnpm add <plugin-package-name> --filter @repo/sanity - Import and add to the
pluginsarray inpackages/sanity/src/index.ts. - Document the plugin on this page.