The CraftJS ROOT node. Holds site-wide design data — palette, styleGuide, fonts, SEO, JSON-LD, head/footer injects, company variables, integrations, redirects, and AI hints. Every page tree begins with ROOT resolved as Background.
The CraftJS ROOT node. Holds site-wide design data — palette, styleGuide, fonts, SEO, JSON-LD, head/footer injects, company variables, integrations, redirects, and AI hints. Every page tree begins with ROOT resolved as Background.
Background is exported from DEFAULT_CRAFT_RESOLVER without the withConditionalVisibility wrapper — ROOT is always visible.
| Prop | Type | Notes |
|---|---|---|
pallet | Array<{ name, color }> | Site palette slots. Names map to CSS vars via toCSSVarName() (camelCase → hyphenated). |
styleGuide | object | Global style tokens — radius, depth, accentFontFamily, input border/bg/text/focus colors, link color, etc. Any *FontFamily key auto-generates a CSS var. Heading/Body fonts live in theme.typography[], not styleGuide — see Theme System docs. |
theme.typography | array | Text-style tokens (full CustomFont shape). Heading and Body are reserved names that drive --heading-font-family / --body-font-family global vars. |
theme | object | Effective theme (palette + styleGuide merged). Read via resolveTheme(). |
modifiers | array | Site-wide modifier classes applied at the root. |
inject.head / inject.footer | string | Raw HTML injected on every page (CSS rules, <script>, etc.). Used for show-hide CSS rules, marquee fixes, transparent-nav scripts. |
seo | object | Default page SEO (title, description, ogImage, …). Per-page Container seo overrides. |
company | object | {{company.*}} template variables — name, email, phone, address. |
integrations | object | GA, Plausible, Stripe Connect, etc. |
redirects | array | Static-export redirects. |
pageMedia | array | Media library entries (type: "cdn" | "url" | "svg" | "r2"). |
Text modifiers in template JSON go on ROOT.props.modifiers as a sibling of props.theme, not nested inside theme. The FOUC pipeline reads them in utils/compileTailwindCSS.ts.ROOT.props.seo when unset.<link> tags to inject.head — the FOUC pipeline + extractGoogleFontsUrl already handles all font-* classes that resolve via *FontFamily styleGuide keys.