Set theme
set_themeWrite the site theme into theme.css (draft): preset, palette, darkPalette, styleGuide tokens (incl. spacingDensity, radii), fonts, typography (type scale), breakpoints. suggest_palettes / suggest_font_pairings only show options. Company fields: site.json (edit_site_file). Names, keys, workflow: get_style_reference({ topic: "theme" }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Site id. | |
| fonts | No | Hint ({ url } or { families }) parsed into heading/body families when styleGuide omits them. | |
| preset | No | Preset slug; loads palette, fonts and styleGuide. Explicit params override it. | |
| daisyui | No | DaisyUI component classes (btn, card…). Default on; HTML imports off. | |
| palette | No | Complete palette — replaces the existing one. [{ name, color }] with DaisyUI names (Primary, Primary Content, Secondary, Accent, Neutral, Base 100/200/300, Base Content, …), never "Background"/"Foreground". Colors: hex, rgb, hsl or oklch(). | |
| styleGuide | No | Design tokens, merged into the existing styleGuide; each key becomes a CSS var (headingFontFamily, bodyFontFamily, radiusBox, buttonPadding, contentWidth, input*Color, …). Key list: get_style_reference({ topic: "theme" }). | |
| typography | No | Type scale tokens, merged by name over the ones fonts made: [{ name: "Heading", fontSize: "3rem", lineHeight: "1.1", letterSpacing: "-0.02em", fontWeight: "700", textTransform: "none" }]. Each field becomes --heading-font-size etc.; the `ph-heading` / `ph-body` classes read them. | |
| breakpoints | No | Responsive widths in px for the whole site (sm, md, lg, xl, 2xl; Tailwind's are 640, 768, 1024, 1280, 1536): { md: 800, lg: 1100 }. What sm:/md:/lg: classes switch at, in the published site. | |
| darkPalette | No | Optional dark-mode palette with the same names. Enables dark mode. |