Introducing @sanity/presets: ready-made schema types for common content patterns
Published: June 23, 2026
v1.0.0
Skip the boilerplate
@sanity/presets ships six define<Type> functions for the most common content patterns. Instead of modelling pages, links, images, and metadata from scratch, call a preset and get a working schema type with sensible defaults.
Included presets
definePage— document type for page building with content blocks, slug, and SEO metadatadefineLink— internal and external links with conditional fieldsdefineCta— call-to-action with an inline link and importance leveldefineSeo— search engine metadata (title, description, Open Graph image)defineImage— image with optional alt text, caption, and hotspotdefineRichText— Portable Text with link annotations, image blocks, and CTA inline objects
Getting started
Install the package, create the registry once, and use the define<Type> functions across your schema files:
import {createPresetsRegistry} from '@sanity/presets'
export const {definePage, defineLink, defineCta, defineImage, defineRichText} =
createPresetsRegistry({
link: {
// Document types an internal link can point to.
to: ['page'],
},
})Experimental
This is a v1.0.0 release and the package is experimental — APIs may change in future versions. Presets are designed to be extended or replaced with hand-modelled types as your schema evolves. Read the full README on npm for usage details and patterns.