
Design fields for an event RSVP app
How It Works
- The AI (or you) creates a design field with a name and value
- The field gets a CSS variable (e.g.,
--page-background) - Your code uses the variable:
background: var(--page-background) - The Design tab shows visual editors for each field type
- Changes update the preview instantly
Field Types
Each type has a specialized visual editor:Using Design Fields
In Your CSS
Always include fallback values: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:Popular Fonts (Quick Select)
Using Fonts
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 corners8px= subtle rounding16px= noticeable rounding9999px= 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:- Write CSS using variables with fallbacks
- Create design fields for each variable
- Fields appear in the Design tab
Via the Design Tab
- Click Add Design Field at the bottom
- Choose a type (color, size, font, etc.)
- Enter a name (e.g., “Card Background”)
- Set the initial value using the visual editor
- Click Add Field
Workflow: Design Then Code
If you create design fields first, then write CSS:- Add “Card Background” as a color field, set to
#ffffff - The CSS variable
--card-backgroundis now available - 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
Can I rename a design field?
Can I rename a design field?
Yes! Click the pencil icon on any field to edit its name and type. The CSS variable will update automatically.
What happens if I delete a field that's used in CSS?
What happens if I delete a field that's used in CSS?
The CSS will fall back to the default value you specified:
var(--deleted-field, fallback). Always use fallbacks.Can I use custom fonts not in the picker?
Can I use custom fonts not in the picker?
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.How do I use the same color in multiple places?
How do I use the same color in multiple places?
Reference one variable from another:
Can I use design fields in JavaScript?
Can I use design fields in JavaScript?
Yes, read CSS variables with: