◉RORK LABJP
●SUBDOMAIN — Rork can now connect your web app to a subdomain only, leaving your root domain and www untouched (12/1)●UPDATES — expo-updates 58.0.23 fixes Android release builds embedding a stale runtime version●FLASH END — Intro pricing for Gemini Flash models ends 12/31, 29 days from now. Time to recheck AI feature costs●HMR — Some report the dev server picking up another server's bundle and then exiting●FIRST VIEW — Map the first screen for a normal launch, a notification, and a link, and back navigation stops surprising you●CARBON — Gemini 4 Carbon and Argon are now at standard rates: $4.00 input, $20.00 output per 1M tokens●SUBDOMAIN — Rork can now connect your web app to a subdomain only, leaving your root domain and www untouched (12/1)●UPDATES — expo-updates 58.0.23 fixes Android release builds embedding a stale runtime version●FLASH END — Intro pricing for Gemini Flash models ends 12/31, 29 days from now. Time to recheck AI feature costs●HMR — Some report the dev server picking up another server's bundle and then exiting●FIRST VIEW — Map the first screen for a normal launch, a notification, and a link, and back navigation stops surprising you●CARBON — Gemini 4 Carbon and Argon are now at standard rates: $4.00 input, $20.00 output per 1M tokens
Articles/Dev Tools
⬡ Dev Tools/2026-04-28Beginner

Communicating Design Rules to AI: Using DESIGN.md for Mobile Apps

Google's open-source DESIGN.md format helps you communicate design specifications to AI tools like Rork. Learn to define colors, typography, and spacing rules in markdown so AI-generated UI stays consistent with your brand.

DESIGN.mdDesign SystemsUI10Rork622Brand Consistency

When you ask AI to build mobile app screens, a nagging doubt creeps in: Is the AI actually following my design rules? Will the colors match? Are the font sizes consistent? Will the spacing feel right? If you could hand the AI a design guidebook it actually understands, design reviews would take half the time.

That's where DESIGN.md comes in. It's an open-source markdown format Google created specifically for this: writing design specifications in a way that both humans and AI can read and follow.

What is DESIGN.md?

DESIGN.md is a lightweight format (Apache 2.0 licensed, open-source) for documenting design systems in plain markdown. Instead of keeping design rules buried in Figma or Adobe XD, you write them in a file called design.md that tools like Rork can read directly.

The philosophy is simple: Design rules should be machine-readable. When you write "primary color is #2563EB and use it for main action buttons," you're creating a specification that AI can follow, not just something a human designer remembers.

Why It Matters for Mobile Apps

Mobile apps live or die by consistency. When buttons across different screens have different colors, when text sizes vary for no reason, when padding is unpredictable—the app feels unpolished, even if the features work perfectly.

DESIGN.md solves this by letting you define:

  • Color tokens: Primary, secondary, error, neutral—with rules for when each applies
  • Typography scales: Heading 1, Heading 2, body text, captions—all with consistent sizing
  • Spacing system: The distance between elements, padding inside containers, margins between sections
  • Component rules: How buttons should look, how cards should behave, how form fields should appear

When Rork generates a new screen, it can reference these rules automatically. Instead of "make a button," you say "make a button following our DESIGN.md," and it stays consistent with screens you built weeks ago.

A Practical Example

Here's what a simple DESIGN.md looks like for a casual app project:

# Design Tokens
colors:
  primary: "#2563EB"
  secondary: "#10B981"
  error: "#EF4444"
  neutral_light: "#F3F4F6"
  neutral_dark: "#1F2937"
 
typography:
  heading_1:
    font_size: "28px"
    line_height: "36px"
    font_weight: "700"
  heading_2:
    font_size: "20px"
    line_height: "28px"
    font_weight: "600"
  body:
    font_size: "16px"
    line_height: "24px"
    font_weight: "400"
 
spacing:
  xs: "4px"
  sm: "8px"
  md: "16px"
  lg: "24px"
  xl: "32px"

Then add human-readable explanations below:

## Colors
 
### Primary (#2563EB)
Use for main action buttons (Create, Save, Continue), active tabs, and primary links.
Never use for errors, disabled states, or secondary information.
 
### Secondary (#10B981)
Success and positive states. Use for checkmarks, confirmation messages, and completed steps.
 
### Error (#EF4444)
Error messages and invalid form fields only.

How AI Tools Read It

When you use Rork or other AI tools, you paste your DESIGN.md into the prompt. The AI then knows the rules and applies them consistently.

Example prompt:

"Create a task management home screen following this DESIGN.md:

[paste DESIGN.md content]

Requirements:
- Large heading 'My Tasks' at the top
- Task list items, each with md (16px) padding
- 'New Task' button in the bottom right using primary color
"

By explicitly referencing DESIGN.md, you're telling the AI "these rules are non-negotiable." The quality jump is significant.

Validation Tools

Google's DESIGN.md ecosystem includes CLI tools for validation and export:

# Check if your design spec is valid
designmd validate design.md
 
# Export to Tailwind CSS
designmd export design.md --format=tailwind
 
# Export to W3C DTCG format
designmd export design.md --format=dtcg

These catch inconsistencies before they become problems.

The Difference It Makes

Without DESIGN.md:

  • Button colors are random or unpredictable
  • Font sizes vary wildly
  • Spacing feels haphazard
  • Multiple screens look like they were designed by different people

With DESIGN.md:

  • All buttons are the brand color
  • Typography is consistent: headings are 28px, body is 16px, every time
  • Spacing follows the 16px base grid
  • Ten screens generated with Rork still feel like one coherent app

In practice, this cuts design review and rework time by 50% or more.

Getting Started

  1. Write down your design rules (colors, fonts, spacing, component rules)
  2. Grab Google's official DESIGN.md template and customize it
  3. Save it as design.md in your project root
  4. Paste it into your Rork prompts
  5. Test the generated UI and refine your DESIGN.md as needed

DESIGN.md is a conversation in shared language between you and AI. It takes effort upfront, but the payoff compounds—especially as your app grows and you generate more screens.

Try it on your next Rork project.

Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

⬡ Dev Tools2026-11-19
New Wallpapers Showed Up Everywhere Except the Filters: Ship the Count and the Category Lists Together
I added 67 wallpapers in one batch. They appeared in the full list and in New, but not under a single category filter, because I had raised the ID limit and forgotten to ship the category lists. Here is a pre-bump check, a client-side way to spot silent fallbacks in an Expo app, and a post-release count against the origin.
⬡ Dev Tools2026-11-04
Catching the Few Seconds Before Streaming Audio Starts: A Loading State and a Timeout
You tap play and nothing happens for a moment. Here is how I model that gap with expo-audio: a requested flag, a 400ms delayed spinner, and an 8-second timeout.
⬡ Dev Tools2026-10-30
It runs in development but the iOS Release build dies on launch — checking whether a missing scheme is the cause
In an expo-router app, an app.json with no scheme can crash only the iOS Release build at launch. A triage table for Release-only crashes, how to read the reason from the log, why Debug and Android survive, the two fixes and why one needs a native rebuild, and a pre-submission check.