This is a demo site built with Root.js.Open the CMS
Sandbox

Content

Long-form rich text (articles, legal pages, docs) with an optional title and sticky sidebar layout.

3 presetsTemplateContent
01Article (narrow)

Guide

Modeling content with templates

6 min read · Updated March 4, 2026

Every page on a Root.js site is a stack of templates: small, self-contained modules that pair a Preact component with a CMS schema. Developers decide what a module can do. Editors decide where it goes and what it says.

Start with the component

Write the component the way you would anywhere else, then describe its props as fields. The CMS generates the editing UI, validation and TypeScript types from that single schema file.

  • One folder per template: schema, presets and component side by side

  • Types are generated with pnpm types, so props never drift

  • Presets give editors a head start with realistic content

Ship it to editors

New folders in templates/ are picked up automatically. There is no registry to update and no deploy step between a developer merging a module and an editor using it.

templates/TemplateQuote/TemplateQuote.schema.tsts
export default schema.define({  name: 'TemplateQuote',  fields: [    schema.string({id: 'quote', translate: true}),    schema.string({id: 'author'}),  ],});

That is the whole workflow. Read on for tips on naming fields, choosing defaults and writing presets that sell the module.

02Legal page (sticky sidebar)

Terms of service

Effective January 1, 2026

These terms govern your use of the Sandbox platform, including Root.js, hosting and related services. By creating an account you agree to them on behalf of yourself or the organization you represent.

1. Your account

You are responsible for the activity on your account and for keeping your credentials secure. Invite teammates with the roles they need, and remove access when they no longer need it.

2. Your content

You own everything you publish. We store and serve it only to operate the service, and we never use it to train models or sell advertising.

  1. You may export all content at any time as JSON.

  2. Deleted documents are recoverable for 30 days.

  3. Backups are encrypted at rest and in transit.

3. Acceptable use

Do not use the service to host malware, to send unsolicited email or to infringe on the rights of others. We may suspend sites that put the platform or other customers at risk.

4. Changes to these terms

We will email account owners at least 30 days before material changes take effect. Continued use after that date means you accept the updated terms.

03Wide, subtle background

Why we built Root.js

Most content platforms force a choice: a friendly editor with a rigid front end, or a flexible framework that leaves editors filing tickets. We wanted both, so we built the CMS directly into the framework. Schemas live next to components, previews render the real site, and publishing is instant.

“The best CMS is the one your editors forget they are using.”
Maya Chen, Head of Product

Today, teams use it to run marketing sites, documentation and multi-language campaigns from a single codebase.