DocumentationCurrent Page

Theme Editor

Customize your design systemwithout writing CSS

The Theme Editor is a visual tool that lets you customize your entire design system through an intuitive interface. Changes are applied as CSS variables, making them instantly available throughout your application.

Key Benefits

  • Real-time preview across multiple page types
  • Auto-generates CSS variables in globals.css
  • Creates AI-friendly documentation (brand.md)
  • Export/import themes as JSON for version control

Getting Started

Learn how to access and use the theme editor interface

Accessing the Theme Editor

Navigate to /theme in your browser to open the visual theme editor.

Open Theme Editor

Interface Overview

The theme editor uses a 3-column layout:

Left: Navigation

Icon-based tabs for Colors, Spacing, Radius, Fonts, and Buttons sections

Center: Preview

Live preview showing your changes on simulated pages (Home, Features, Pricing, Dashboard)

Right: Settings

Controls for the active section with sliders, color pickers, and dropdowns

Tip
Use the Light/Dark toggle in the preview to switch between editing light mode and dark mode colors.

Colors

Customize your color palette for light and dark modes

Color System

The theme editor provides 22 color tokens that work together to create a cohesive design system. Each color has separate values for light and dark modes.

Info
Switch between light and dark mode in the preview panel to edit each mode separately. Maintaining good contrast ratios ensures your design is accessible.

Color Tokens Reference

TokenPurposeCSS VariableTailwind Classes
primaryMain brand color for buttons, links, and CTAs--primarybg-primary, text-primary, border-primary
primaryForegroundText color on primary backgrounds--primary-foregroundtext-primary-foreground
secondarySecondary actions and accents--secondarybg-secondary, text-secondary
secondaryForegroundText on secondary backgrounds--secondary-foregroundtext-secondary-foreground
accentHighlight color for special elements--accentbg-accent, text-accent
backgroundMain page background--backgroundbg-background
foregroundPrimary text color--foregroundtext-foreground
cardCard and panel backgrounds--cardbg-card
mutedSubdued backgrounds and disabled states--mutedbg-muted, text-muted
mutedForegroundSecondary text and descriptions--muted-foregroundtext-muted-foreground
destructiveError states and dangerous actions--destructivebg-destructive, text-destructive
borderDefault border color--borderborder-border
inputInput field borders--inputborder-input
ringFocus ring color--ringring-ring
chart1-5Data visualization colors--chart-1 to --chart-5bg-chart-1, bg-chart-2, etc.
Warning
Always ensure sufficient contrast between foreground and background colors for accessibility. A minimum contrast ratio of 4.5:1 is recommended for normal text.

Spacing

Control the spacing scale used throughout your application

The spacing scale defines consistent gaps, padding, and margins. The 6-value scale ensures visual hierarchy and rhythm throughout your design.

TokenDefaultRangeUse Case
xs0.25rem0-6remTight spacing between related elements
sm0.5rem0-6remSmall gaps in compact layouts
md1rem0-6remStandard spacing for most elements
lg1.5rem0-6remMedium section spacing
xl2rem0-6remLarge section spacing
2xl3rem0-6remHero sections and major dividers

CSS Variables

:root {
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
}
Tip
Use the spacing scale consistently to create visual rhythm. Avoid arbitrary spacing values.

Border Radius

Define border radius values for different UI elements

Border radius values control the roundness of corners on buttons, cards, inputs, and other elements.

Radius Scale

None (Sharp)
0
Small (Subtle)
0.125rem
Medium (Default)
0.375rem
Large (Cards)
0.5rem
XL (Features)
0.75rem
2XL (Bold)
1rem
Full (Pills)
9999px
TokenUse CaseExamples
noneSharp cornersData tables, technical UIs
smSubtle roundingSmall buttons, inputs
mdStandard roundingDefault buttons, cards
lgCard-like elementsModals, large cards
xlFeature sectionsHero cards, callouts
2xlBold roundingLarge feature cards
fullCircular/pill shapeBadges, avatars, pill buttons

Typography

Customize fonts, text sizes, and typographic styles

Font Families

The theme editor integrates with Google Fonts and provides three font family slots:

FontPurposeOptions
sansBody text and UIInter, Roboto, Poppins, Open Sans, and 14 more
monoCode blocksJetBrains Mono, Fira Code, Source Code Pro, and 6 more
headingHeadlinesPlayfair Display, Merriweather, Montserrat, and 12 more

Text Sizes

Control the font size for different text elements:

ElementCSS VariableDefault Range
h1--text-h12-10rem
h2--text-h21.5-4rem
h3--text-h31.25-2rem
h4--text-h41-1.5rem
p--text-p0.75-1.25rem
blockquote--text-blockquoteDropdown presets
label--text-labelDropdown presets
code--text-codeDropdown presets

Typography Styles

Fine-tune line heights and letter spacing:

PropertyCSS VariableRange
Body Line Height--line-height1.0-2.5
H1 Line Height--line-height-h10.8-1.8
H2 Line Height--line-height-h20.8-1.8
H3 Line Height--line-height-h30.8-1.8
Letter Spacing--letter-spacing-0.05em to 0.2em
Warning
Important: Do not override typography sizes with Tailwind classes like text-4xl or leading-tight on headings. The theme editor controls these via CSS variables. Use font-bold, text-primary, and spacing classes instead.

Buttons

Customize button styling and hover effects

Control button appearance including border radius, font weight, font size, and hover effects.

Button Properties

PropertyCSS VariableOptions
Border Radius--button-radius0-3rem slider
Font Weight--button-font-weight300-900 (100 steps)
Font Size--button-font-size0.75-1.5rem + presets

Hover Effects

Choose from 5 hover effect styles:

None
No hover effect
Opacity
Fade to 80% opacity
Lift
Raise with shadow
Scale
Slightly enlarge (1.05x)
Glow
Subtle glow effect
Info
Button hover effects use CSS variables like --button-hover-opacity, --button-hover-transform, and --button-hover-shadow.

Actions

Apply your theme, export settings, and download starter projects

Apply to Project
Updates globals.css with new CSS variables and regenerates brand.md documentation
Export JSON
Download brand-theme.json with all settings for backup or version control
Import JSON
Load a previously saved theme from a JSON file
View CSS
Preview the CSS code that will be generated before applying
Download Starter
Generate a ZIP file with a starter project using your current theme
Warning
After clicking "Apply to Project", you must refresh your browser to see the changes take effect.

brand.md Integration

Understand how the theme editor generates AI-friendly documentation

What is brand.md?

docs/brand.md is an auto-generated file that documents your entire design system in a human-readable and AI-parseable format.

What it contains

  • Complete color palette tables (light and dark modes)
  • Typography settings (fonts, sizes, line heights)
  • Spacing scale and border radius values
  • Button styles and hover effects
  • Raw theme JSON for programmatic access

How it updates

When you click "Apply to Project" in the theme editor:

  1. The :root and .dark blocks in src/app/globals.css are replaced
  2. The docs/brand.md file is regenerated with current values
  3. Both files are updated atomically in a single operation

AI Integration

AI code assistants (like Claude, Cursor, GitHub Copilot) can read brand.md to understand your design system and generate code that follows your brand guidelines.

# Example: Ask your AI assistant
"Create a new feature card component using the design system from brand.md"

# The AI will use your custom colors, spacing, and typography
Tip
Include brand.md in your version control to track design system changes over time.

File Locations

docs/brand.md

Auto-generated design system documentation

src/app/globals.css

CSS variables updated by theme editor

.cursor/commands/brand.md

Developer guidelines for using the design system