Sanity equivalent to ACF Flexible Content or Prismic Slices?

2 replies
Last updated: Jan 28, 2026
Hi all πŸ‘‹ thought I'd jump in on the Sanity slack community and fire off a quick question: is there an equivalent out of the box of Wordpress' ACF flexible content field (https://www.advancedcustomfields.com/resources/flexible-content/ ) - or something like Prismic slices (https://user-guides.prismic.io/en/articles/383933-slices ) E.g the user can select from maybe 3 field types (a quote, a hero image and carousel).
AI Update

Yes! Sanity has a built-in equivalent to ACF's Flexible Content and Prismic's Slices, and it's actually one of the platform's core strengths. You'll use array fields with multiple object types to achieve this.

The Short Answer

In Sanity, you create an array field with an of property that defines which block types can be added. Here's a quick example matching your use case (quote, hero image, carousel):

{
  name: 'pageBuilder',
  title: 'Page Builder',
  type: 'array',
  of: [
    { type: 'hero' },
    { type: 'quote' },
    { type: 'carousel' }
  ]
}

Each of those types (hero, quote, carousel) would be defined as separate object types in your schema with their own fields. Content editors can then add, reorder, and remove these blocks just like in ACF or Prismic.

How It Works

Sanity calls this pattern a Page Builder, and at its core, it's an array of objects. The array field type supports multiple member types through the of property, which is exactly what you need for flexible content.

The key advantages over ACF/Prismic:

  • Drag-and-drop reordering built-in
  • Copy/paste support for entire arrays or individual blocks
  • Type-safe if you're using TypeScript
  • Highly customizable - you can add custom previews, validation, and interactive components

Full Example

Here's a more complete implementation:

// Define your block types
const hero = {
  name: 'hero',
  title: 'Hero Section',
  type: 'object',
  fields: [
    { name: 'heading', type: 'string' },
    { name: 'image', type: 'image' },
    { name: 'cta', type: 'string' }
  ]
}

const quote = {
  name: 'quote',
  title: 'Quote Block',
  type: 'object',
  fields: [
    { name: 'text', type: 'text' },
    { name: 'author', type: 'string' }
  ]
}

const carousel = {
  name: 'carousel',
  title: 'Image Carousel',
  type: 'object',
  fields: [
    {
      name: 'images',
      type: 'array',
      of: [{ type: 'image' }]
    }
  ]
}

// Add to your page document
{
  name: 'page',
  type: 'document',
  fields: [
    { name: 'title', type: 'string' },
    {
      name: 'content',
      title: 'Page Content',
      type: 'array',
      of: [
        { type: 'hero' },
        { type: 'quote' },
        { type: 'carousel' }
      ]
    }
  ]
}

Why This Approach is Powerful

Unlike ACF where flexible content is an add-on concept, Sanity's array fields are a fundamental schema type with first-class support. This means:

  1. Better authoring experience - Content editors get visual previews of each block type
  2. Reusability - You can use references instead of objects if you want blocks shared across pages
  3. Flexibility - Mix objects, references, and even rich text blocks in the same array
  4. No plugin required - This is core functionality, not a premium add-on

The Page Builder course has a full walkthrough on implementing this pattern with best practices around modeling for meaning rather than presentation. There's also a great guide on using structured content for page building that covers the architectural decisions you'll want to consider.

Welcome to the Sanity community! πŸ‘‹

Show original thread
2 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?