Documentation
Feedback
Guides
API Reference

Guides
Guides
CMS

Understanding components and sections

Understand what components and sections are in the CMS, how they differ, and how they work together to build pages in storefronts integrated with the CMS.

Components and Sections are the building blocks that editors and developers use to assemble storefront pages through the CMS. Understanding the difference between them is key to deciding what to create when you want to expose new content for editing in the VTEX Admin and where it should live in your project.

This guide explains both concepts, shows how they relate to Content Types, and lists common Section examples shipped with FastStore.

Content hierarchy

In the CMS, content is organized hierarchically: a Content Type specifies which Sections are available on a page, and each Section consists of one or more Components (groups of fields).

At runtime, your storefront (FastStore or another headless storefront) maps this hierarchy, Content Types, Sections, and Components, into actual UI components and HTML.

Components

A Component is a group of fields declared with JSON Schema. It defines the data structure, such as a title, an image, or a link, that editors complete in the CMS Admin form.

Regardless of the storefront technology you use, a Component:

  • Declares which fields exist and their data types.
  • Controls how fields appear in the Admin (labels, descriptions, validation).
  • Can be reused across different sections and content types.

Schema files for components

Each component resides in its own .jsonc file, named following the convention cms_component__ComponentName.jsonc. The schema relies on a few CMS-specific keywords:

KeywordPurpose
$componentKeyUnique identifier for the component.
$componentTitleDisplay name displayed in the CMS interface.
$extendsInherits properties from base schemas (for example, #/$defs/base-component).

For more details on schema declarations, see Understanding CMS architecture and schema declarations.

The schema below defines a reusable Link Component with two fields (text and url) in a FastStore project.


_17
{
_17
"$extends": ["#/$defs/base-component"],
_17
"$componentKey": "Link",
_17
"$componentTitle": "Link",
_17
"type": "object",
_17
"required": ["text", "url"],
_17
"properties": {
_17
"text": {
_17
"title": "Text",
_17
"type": "string"
_17
},
_17
"url": {
_17
"title": "URL",
_17
"type": "string"
_17
}
_17
}
_17
}

A plain component can't be placed directly on a page. It's designed for reuse inside a section or as a field nested within another component.

Sections

A section is a type of component that functions as a dynamic container for other components. Sections are the units that editors drag, reorder, and configure on a page in the CMS Admin. They group other components to create specific parts of a storefront page, such as a hero banner, a product shelf, or a call-to-action block.

Conceptually, a section:

  • Uses the same JSON Schema mechanics as a regular component.
  • Is referenced from a content type, so it becomes available in the page editor.
  • Encapsulates a part of the page (for example, "Hero", "Footer", "Product shelf").

Rendering sections in storefronts

How a section is rendered depends on the storefront:

  • In FastStore projects, each section corresponds to a React component located in src/components/. These components are exported via src/components/index.tsx to render the data that editors configure in the Admin.
  • In other headless storefronts, you can map section identifiers (for example, $componentKey: "Hero") to your own Vue, React, or server-side templates, following the same principle.

CallToAction section example

The schema below declares a CallToAction section in a FastStore project, composed of a title field and a nested link object, which mirrors the Link component shape:


_30
{
_30
"$extends": ["#/$defs/base-component"],
_30
"$componentKey": "CallToAction",
_30
"$componentTitle": "Call To Action",
_30
"title": "Call To Action",
_30
"description": "Get your 20% off on the first purchase!",
_30
"type": "object",
_30
"required": ["title", "link"],
_30
"properties": {
_30
"title": {
_30
"title": "Title",
_30
"type": "string"
_30
},
_30
"link": {
_30
"title": "Link Path",
_30
"type": "object",
_30
"required": ["text", "url"],
_30
"properties": {
_30
"text": {
_30
"title": "Text",
_30
"type": "string"
_30
},
_30
"url": {
_30
"title": "URL",
_30
"type": "string"
_30
}
_30
}
_30
}
_30
}
_30
}

Differences between components and sections

CriteriaComponentSection
PurposeDefines a reusable data shape (for example, a link, badge, or media block).Page-placeable container of components that represents a full page block (for example, hero, shelf, footer).
ScopeReused inside sections or other components.Exposed in the CMS page editor for editors to add to a page.
Schema fileStored as a component schema file (for example, cms_component__*.jsonc in FastStore projects).Also stored as a component schema file; sections are distinguished by their usage, referenced by Content Types, and rendered as page blocks.
Referenced from a content typeTypically no. Used as nested objects or arrays inside sections and other components.Yes. Listed in one or more content type schemas so editors can add them to pages.
RenderingData is consumed by a parent component or template.Maps directly to a storefront component or template that renders an entire page block.

Relationship with content types

A content type, such as home, pdp, plp, or landingPage, defines a page structure and declares which sections editors can add to that page. When you create a new section, you make it available to editors by referencing it from one or more content type schemas.

In any storefront integration:

  • Components and sections define what can be edited.
  • Content types define where those sections can appear and how the page is structured.
  • Your storefront code fetches content type entries and renders the referenced sections and components.

For a deeper dive into how schemas are organized, validated, and deployed, see Understanding CMS architecture and schema declarations.

Native sections in FastStore

FastStore ships with several native sections you can reuse or override before creating new ones. These examples apply specifically to FastStore projects, but the underlying concepts (page-placeable Sections composed of Components) apply to any storefront.

Some examples:

  • Hero: Full-width banner used above the fold.
  • ProductGrid: Product list typically used on PLP pages.
  • Navbar: Top navigation bar.

Next steps

Extending a component
Learn how to extend an existing component, such as the CallToAction Section, in your FastStore project.
Content plugin
Manage CMS schemas, organize components, and define Content Types from the terminal using the Content plugin.
Contributors
2
Photo of the contributor
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
2
Photo of the contributor
Photo of the contributor
Was this helpful?
Suggest edits (GitHub)
On this page