
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYes, you can definitely create an empty or placeholder object within a schema array! This is useful for identifiers, dividers, or markers within content blocks.
Here's how you can define a minimal object type in your array:
{
name: 'contentBlocks',
type: 'array',
of: [
{
type: 'block' // regular content
},
{
name: 'placeholder',
type: 'object',
fields: [
{
name: 'identifier',
type: 'string',
title: 'Identifier',
initialValue: 'marker'
}
],
preview: {
select: {
identifier: 'identifier'
},
prepare({identifier}) {
return {
title: `--- ${identifier || 'Placeholder'} ---`
}
}
}
}
]
}If you want an even more minimal placeholder that's truly "empty" (no fields at all), you can do:
{
name: 'divider',
type: 'object',
fields: [
{
name: 'hidden',
type: 'string',
hidden: true,
initialValue: 'divider'
}
],
preview: {
prepare() {
return {
title: '--- Divider ---',
subtitle: 'Visual separator'
}
}
}
}The key points:
preview property to make it visually identifiable in the array_key property is automatically added to track each array itemThis approach works great for creating visual separators, section markers, or any kind of structural identifier in your content blocks. The array fields documentation explains how arrays support multiple member types and how each item gets tracked with unique keys.
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store