Inline Schemas
Inline schemas let you create reusable content components that can be embedded inside other models. Think of them as custom building blocks — once you create one, it appears as a field type you can add to any model.
Overview
An inline schema is a model whose fields can be embedded directly within another record’s data, rather than existing as a separate record with its own ID. For example:
- A Hero Banner with heading, image, and call-to-action button
- A Testimonial Card with quote, author name, and photo
- A Feature Card with icon, title, and description
Once created, these appear alongside the built-in field types (text, integer, image, etc.) when adding fields to any model.
How It Works
- Create a model with the Embedded kind (
inline: truein config) and the fields your component needs - The model’s key now appears as a field type in other models
- When editors fill in that field, they see a structured form matching the inline schema
Model Kind
Every model is one of two kinds, chosen when you create it:
Embedded (inline: true): can be embedded in other content, but has no records of its own. Best for components like buttons, cards, and hero banners.
Record-bearing (Standalone) — Creates individual records managed separately. This is the default for all models. Best for pages, blog posts, and products.
A model is one kind or the other, never both. You can change the kind later only while nothing depends on it: a record-bearing model becomes embedded only while it has no records, and an embedded model becomes record-bearing only while no other model embeds it.
In the console
Creating an inline schema
- Go to Content > Models
- Click Create Model
- Fill in the details:
- Name: “Hero Banner”
- Key:
hero-banner(auto-generated from name)
- Add fields:
- Heading (text, required)
- Subheading (text)
- Background Image (image)
- Button Text (text)
- Button URL (text)
- Choose the Embedded kind when creating the model
- Click Save
Using an inline schema as a field
- Edit any model (e.g., Page)
- Click Add Field
- In the field type dropdown, you will see your inline schemas listed alongside built-in types:
- Hero Banner
- Testimonial Card
- Feature Card
- Select one and configure the field (label, required, help text)
Now when editing records of that model, editors see a structured form for the inline component.
Nesting Components
Inline schemas can contain other inline schemas, allowing you to build complex layouts from simple pieces:
Feature Grid
-- Heading (text)
-- Features (array of Feature Card)
-- Icon (image)
-- Title (text)
-- Description (textarea)Page
-- Hero (Hero Banner)
-- Sections (array of Page Section)
-- Section Type (select)
-- Feature Grid (Feature Grid)
-- Testimonials (array of Testimonial Card)
-- CTA (CTA Section)Common Patterns
Page Sections
Create reusable page sections that editors can mix and match:
| Component | Fields |
|---|---|
| Hero Banner | Heading, subheading, background image, CTA button |
| Feature Grid | Heading, list of feature cards |
| Testimonials | Heading, list of testimonial cards |
| CTA Section | Heading, description, button |
Cards
Create consistent card layouts used across multiple models:
| Component | Fields |
|---|---|
| Product Card | Image, title, price, link |
| Team Member | Photo, name, role, bio |
| Blog Preview | Image, title, excerpt, date |
UI Elements
Create standardized, reusable UI components:
| Component | Fields |
|---|---|
| Button | Text, URL, style variant, size |
| Link | Text, URL, open in new tab |
| Badge | Text, color |
Inline Schemas in Prose
An inline schema is also what a prose field places in a flow. A prose field’s allowedTypes names inline-model keys, and each one placed in the document is an embed — the same definition, sitting among the paragraphs rather than stored as its own record.
Two effects:
- Adding a field to an inline schema adds it everywhere that model is embedded. A
Herowithheadline,subheadlineandimagereads with all three at every position it appears. - A prose field admits nothing it does not name. Unlike the field type it replaced, prose is text-only by default;
allowedTypesis what opens it:
{
"key": "body",
"type": "prose",
"label": "Body",
"config": {
"allowedTypes": ["hero", "feature-grid", "testimonial-card"]
}
}Any embedded model an allowedTypes list admits may be placed. There are no per-type carve-outs — a section, a table and a call-to-action are all just embedded models — and prose nests without limit, so an embed may carry a prose field of its own.
Resolved shape
An embed in a resolved flow keeps its _id and its model type:
{
"_type": "hero",
"_id": "p1aa0001",
"value": {
"headline": "Welcome",
"subheadline": "...",
"image": { "url": "https://...", "width": 1920, "height": 1080, "alt": "..." }
}
}Read through GraphQL it arrives typed, as a member of the field’s entries union beside Passage. Field values resolve through the normal pipeline — image fields return full Image objects, references return resolved record data, and so on.
Media and references without a model
A prose field’s allowedTypes also takes the platform’s own primitives — image, video, file, reference, geopoint — so the cross-cutting cases need no per-project inline schema:
- an image / video / file embed resolves with the asset’s full metadata;
- a reference embed resolves to a record you can type-narrow inline.
Best Practices
- Keep components focused. Each inline schema should do one thing well.
- Use clear names. The name appears in the field type selector, so editors need to understand what each component is for.
- Add descriptions to help editors know when to use each component.
- Start simple and add fields as needed. Removing fields later is harder than adding them.
- Watch nesting depth. More than two or three levels of nesting can make the editing experience confusing.
- Use inline-only mode for components that should never exist on their own (buttons, badges, cards).