Skip to Content
New to cms0? Start with the hosted, self-hosted, or app integration path.
Content modelingCustom types

@cms0/cms0/custom-types exports reusable field types that the CLI understands.

Use them instead of rebuilding common content shapes by hand.

Common imports

src/cms0.ts
import type { File, Image, LocalizedRichText, LocalizedString, RichText, Seo, Video, } from "@cms0/cms0/custom-types";

Media

src/cms0.ts
type Hero = { image: Image; video?: Video; download?: File; };

Rich text and localization

src/cms0.ts
type MarketingCopy = { eyebrow: LocalizedString; body: LocalizedRichText; footnote?: RichText; };

SEO

src/cms0.ts
type PageContent = { title: string; seo?: Seo; };

Seo works with helpers such as toNextMetadata.

Success check

Use custom types when the editor needs a richer control than a primitive string, number, or boolean. Keep ordinary fields ordinary.