Guide

Page builder

Pages (and only pages — not articles) are composed from sections in the page builder. Each section is a schema object + React component registered in the app.

How pages work

  1. Create or edit a Page in Studio
  2. Open the Content tab → Sections
  3. Add, reorder, or remove sections
  4. Publish

Routing uses the page's uri field. The homepage is a singleton (_id: homepage, URI /).

Implementation:

  • Schema: sanity/schemas/page-sections/
  • Components: features/page-builder/sections/
  • Registry: features/page-builder/page-sections.tsx

Built-in sections

Hero Section (heroSection)

Large intro block with optional media and CTAs.

FieldPurpose
EyebrowSmall label above headline
HeadlineRequired main title
SubheadlineSupporting text
MediaOptional image or Mux video
CTAsArray of link buttons (primary/secondary)

Use for: Page intros, campaign landings, homepage hero.

Features Section (featuresSection)

Grid of feature cards with icon, title, and description.

FieldPurpose
Headline / SubheadlineSection header
FeaturesArray of { title, description, icon }

Use for: Product capabilities, service lists, "why us" blocks.

Steps Section (stepsSection)

Numbered or sequential steps with optional code snippets.

FieldPurpose
Eyebrow / Headline / SubheadlineSection header
StepsArray of { title, description, code? }

Use for: Onboarding flows, tutorials, process explanations.

CTA Section (ctaSection)

Call-to-action band with headline and buttons.

FieldPurpose
Headline / SubheadlinePrompt copy
CTAsLink buttons

Use for: Bottom-of-page conversions, "get started" prompts.

Contact Form Section (contactFormSection)

Embeds the contact form with configurable labels and success message.

FieldPurpose
Headline / SubheadlineForm intro
Submit labelButton text
Success messagePost-submit copy

Use for: Contact, lead capture. Requires SANITY_API_EDIT_TOKEN. See contact-forms.md.

Text Banner Section (textBannerSection)

Simple text block with headline and subheadline.

FieldPurpose
Headline / SubheadlineText content

Use for: Announcements, short statements between heavier sections.

Adding a new section

Don't hand-edit registries — use Plop:

pnpm plop
pnpm sanity:typegen

See code-generation.md.

Live preview

In Presentation, section edits update in place via PageSectionsLive and usePresentationQuery. See draft-mode.md.

Articles vs pages

Articles use Portable Text (body) — not the page builder. Only pages use sections. See articles.md.