The bundle
A theme is two paired files underthemes/, sharing the same stem so the runtime can pair them:
<id>.md is the definition the agent reads: a palette table (text, muted, accent, rule, band roles as Tailwind utilities), type-scale overrides, pageOptions layout, fixed components as paste-ready JSX, and an aesthetic paragraph that commits to one direction.
<id>.demo.tsx is a runnable mini-doc with the same module shape as docs/<id>/index.tsx: one default-exported component plus pageOptions. It inlines the same fixed components the markdown defines, so what the demo shows matches what gets pasted into real docs.
The dev UI’s Themes panel currently shows a placeholder card for theme demos. Live demo previews are being re-enabled. The demo file stays valid and pairable regardless, so keep writing it.
How themes get used
- The bundled create-theme skill authors the bundle. It can derive a theme from screenshots or brand images, a free-text description, or an existing doc whose look you want to lift out and reuse. See Working with agents.
- The create-doc skill lists registered themes as a picker option when scaffolding a new document, then copies the theme’s palette, utilities, and fixed components into the doc’s source.
- A doc built from a theme sets
meta.themeto the theme id (matching the<id>.mdbasename). When editing such a doc, the theme file is authoritative over the framework’s default palette and type scale.
Writing one
Ask your agent to “create a theme called X from these images” (or from an existing doc), and the create-theme skill handles structure, pairing, and self-review. If you write one by hand, match an existing bundle’s section order: Palette, Typography, Layout, Fixed components, Aesthetic, Example usage. The fixed components must be valid Takumi-dialect JSX (tw prop, no className, no hooks), because they get pasted verbatim into documents. See Documents for the dialect.