article

Sanity CMS: What It Is, How It Works, and When It's Worth It

Sanity is a headless CMS where content lives entirely separately from design. Here's how it works, what structured content and GROQ actually mean, and when it beats a traditional CMS — and when it's simply overkill.

General
19.8.2026
5
minut
Updated:
19.8.2026
Content
Quick Summary (TL;DR)

Sanity is a headless CMS, meaning a content system that manages your content and takes no position at all on how your site looks. Content lives as structured data in the cloud, and you build whatever front end you need on top of it — a Next.js site, a mobile app, an online store, all pulling from the same source. The core idea is structured content: you model content by what things are rather than how they look, so the same data survives a complete redesign. The schema is written in TypeScript, which puts your content model in Git where it gets reviewed like the rest of your code. Sanity Studio, the editing interface, is a React application you shape around the people who actually use it. Content is queried with GROQ, selecting exactly the fields you need. Sanity suits content-heavy, structured projects; for a ten-page brochure site it is overkill.

What Sanity CMS is

Sanity is a headless CMS — a content system that deals purely with content and takes no position whatsoever on how your site looks. Content lives as structured data in the cloud, and you build whatever front end you like on top of it: a Next.js website, a mobile app, an online store, a screen in a shop. Everything draws from the same source.

That's the fundamental difference from systems like WordPress or Webflow, where content is bound to a template and to a page. In Sanity you don't have "a page with some text on it". You have an article, a product, a case study — a data object with fields that you render wherever you need it.

I work with Sanity alongside Webflow. They aren't competitors; they're tools for different situations, and below I'll show you how to tell which one is yours.

Headless means the front end is on you

A traditional CMS gives you the admin and the design in one package. The upside is speed; the downside is a ceiling. Whatever the template can't do, you can't do without fighting the system.

A headless CMS splits that package apart. Sanity serves your content over an API and you build the front end yourself. That removes any ceiling on design or performance — but it also means the website doesn't come free with the CMS. Somebody has to build it.

In practice this means a Sanity project is always a development project. If you're looking for something where you pay and then assemble the site yourself, you want Webflow, not Sanity.

Structured content: model data, not appearance

This is the idea Sanity rests on, and the single most common place projects go wrong.

You model content by what things are, not by how they look. A field is called features, not threeColumnRow. callToAction, not redButton. The test is simple: if you redesigned the site in two years, would that name still make sense? threeColumnLayout fails — what happens when there are two columns?

It pays off because the same data then works in a new design, in an app and in a newsletter without rewriting a word. Once appearance leaks into your schema, you're back to templates and the entire advantage of going headless is gone.

The schema is written in code

Your data model isn't click-and-drag — you define it in TypeScript. It looks like this:

import { defineType, defineField } from 'sanity'

export const article = defineType({
  name: 'article',
  title: 'Article',
  type: 'document',
  fields: [
    defineField({
      name: 'title',
      type: 'string',
      validation: (rule) => rule.required(),
    }),
    defineField({
      name: 'slug',
      type: 'slug',
      options: { source: 'title' },
    }),
  ],
})

Having the schema in code has a practical consequence: your content model lives in Git. You get change history, you review it in pull requests, and you deploy it like the rest of the application. Click-based systems don't give you that.

Sanity Studio: an editor you shape yourself

Studio is the editing interface — a React application you either host yourself or let Sanity host. It isn't a finished product you take as-is. You can restructure its navigation, add custom input fields, previews and entire tools.

For a client that means an admin built around their content, rather than a generic system where they have to learn what each field is for. For me that's Sanity's biggest practical advantage: the editor adapts to the editorial team, not the other way round.

GROQ: how content reaches the page

You pull data out of Sanity with a query language called GROQ. It plays a similar role to SQL or GraphQL, but it's designed specifically for structured content:

*[_type == "article" && defined(slug.current)] | order(publishedAt desc) [0...10] {
  title,
  "slug": slug.current,
  publishedAt,
  author->{ name }
}

That query picks up articles that have a slug, sorts them newest first, takes the first ten, and pulls in each author's name from the linked document along the way. The -> arrow is what dereferences that link.

The important part is that you retrieve exactly the fields you want — not the whole document. You feel the difference in page speed.

What people build Sanity with

Sanity is front-end agnostic, but in practice you'll mostly run into these combinations:

  • Next.js — the most common choice, with an official next-sanity package and the best live preview support.
  • Astro — a good fit for content sites where raw speed is the point.
  • Nuxt and SvelteKit — when the team is already on Vue or Svelte.
  • Shopify Hydrogen — stores where Shopify owns the products and Sanity owns everything else.

The feature clients appreciate most: Visual Editing. An editor clicks text directly in the site preview and Studio opens on exactly that field. It removes the main drawback of going headless — that editors can't see what they're editing.

When Sanity makes sense, and when it doesn't

It makes sense when:

  • The same content needs to appear in several places — site, app, store.
  • You have a lot of structured content: a catalogue, a project database, a multilingual archive.
  • You want a tailored editing experience and you're willing to pay for it in development.
  • You expect to rebuild the site in a few years but keep the content.

It doesn't make sense when:

  • You need a ten-page brochure site. Sanity is a sledgehammer there, and Webflow gets you to the same place faster and cheaper.
  • You want to rearrange page layouts yourself after handover. In Sanity you change content, not design — design needs a developer.
  • You don't have budget for the front end. The CMS is only half the project.

I say this plainly because the wrong tool only reveals itself a year in, when backing out is expensive. I work through similar trade-offs in my article on multilingual websites in Webflow.

What to take away

Sanity is for projects where content is an asset — it has structure, it outlives the current design, and it gets used in more than one place. You pay for that flexibility by having someone build the front end and the editing experience.

If you're not sure whether Sanity is your route or Webflow would comfortably do the job, drop me a line. We'll go through what your project actually needs, and I'll tell you when the cheaper option is the right one.

What is Sanity CMS?

Sanity is a headless CMS — a system that manages only your content and takes no position on design. Content lives as structured data in the cloud and you build your own front end on top of it, whether that's a website, a mobile app or an online store.

How is Sanity different from WordPress or Webflow?

Your content isn't tied to a template. WordPress and Webflow hand you the admin and the design in one package; Sanity gives you content over an API and leaves the front end to you. That removes any ceiling on design, but it also means the website doesn't come free with the CMS.

Do I need a developer to use Sanity?

To launch, yes. To run it day to day, no. Building the schema, the Studio and the front end is developer work, but once the project is live you manage content yourself in Sanity Studio without touching code.

What is GROQ?

GROQ is the query language you use to pull content out of Sanity. It plays a similar role to SQL or GraphQL, but it's designed specifically for structured content — you select exactly the fields you need and resolve linked documents in the same query.

When is Sanity the wrong choice?

On smaller brochure sites where ten pages cover it and you want to rearrange layouts yourself after handover. Sanity is a sledgehammer there, and Webflow will get you to the same place faster and cheaper.

Can I use Sanity content outside my website?

Yes, and it's one of the main reasons people pick Sanity. Content is stored as data, so the same library of articles or products can feed a website, a mobile app and an online store at once.

Planning a new website or redesign in Webflow?

Write to me briefly,

Jan Vodvárka
Designer & Webflow vývojář
Webflow premium partner badge

Webflow Premium Partner

Webflow premium partner badge
Webflow Premium Partner