Skip to main content
Design fields are CSS variables that control your app’s appearance. Colors, fonts, spacing, shadows—all adjustable with visual editors, no code required.
Design system panel

Design fields for an event RSVP app

How It Works

  1. The AI (or you) creates a design field with a name and value
  2. The field gets a CSS variable (e.g., --page-background)
  3. Your code uses the variable: background: var(--page-background)
  4. The Design tab shows visual editors for each field type
  5. Changes update the preview instantly

Field Types

Each type has a specialized visual editor:

Using Design Fields

In Your CSS

Always include fallback values:
Always use fallback values: var(--name, fallback). This ensures your app works even before design fields are created.

Name to CSS Variable

Field names are converted to kebab-case CSS variables:

Color Fields

Color fields use a palette picker with:
  • Quick-select color chips
  • Full color picker
  • Hex input
  • Theme colors (other colors in your project)

Common Color Fields

Using Colors


Font Fields

Font fields include a picker with 1000+ fonts from Bunny Fonts:

Using Fonts

Chain fallbacks for fonts: var(--heading-font, var(--body-font, sans-serif)) uses the body font if no heading font is set.

Size Fields

Size fields use a slider from 0-96px. Good for:
  • Font sizes
  • Spacing (padding, margins, gaps)
  • Icon sizes

Using Sizes


Radius Fields

Radius fields control border-radius with a visual slider:
  • 0px = square corners
  • 8px = subtle rounding
  • 16px = noticeable rounding
  • 9999px = fully rounded (pill/circle)

Using Radius


Shadow Fields

Shadow fields offer preset options:

Using Shadows


Creating Design Fields

Via the AI

The AI automatically creates design fields when building your app:
The AI will:
  1. Write CSS using variables with fallbacks
  2. Create design fields for each variable
  3. Fields appear in the Design tab

Via the Design Tab

  1. Click Add Design Field at the bottom
  2. Choose a type (color, size, font, etc.)
  3. Enter a name (e.g., “Card Background”)
  4. Set the initial value using the visual editor
  5. Click Add Field

Workflow: Design Then Code

If you create design fields first, then write CSS:
  1. Add “Card Background” as a color field, set to #ffffff
  2. The CSS variable --card-background is now available
  3. Use it in your CSS: background: var(--card-background, #ffffff)

Best Practices

Use Descriptive Names

Good

  • Card Background
  • Header Text Color
  • Button Hover Background
  • Container Padding

Avoid

  • Primary Color
  • Color 1
  • Background
  • Size

Consistent Naming Patterns

Start Minimal

Don’t create every possible field upfront. Let the AI add fields as needed, or add them when you actually need customization. A simple app might have 5-10 design fields. A complex app might have 20-30.

Dark Mode Pattern

Create paired light/dark fields:

Organizing Fields

Design fields appear in the order they’re created. Group related fields by creating them together:

FAQ

Yes! Click the pencil icon on any field to edit its name and type. The CSS variable will update automatically.
The CSS will fall back to the default value you specified: var(--deleted-field, fallback). Always use fallbacks.
Use the “Custom” (text) field type and enter any font-family value. You’ll need to ensure the font is loaded via a <link> tag or @font-face.
Reference one variable from another:
Yes, read CSS variables with: