Back to blog
Design systems Published 2026-07-23Updated 2026-07-23 8 min read

By Tianpeng He, creator and operator of U2C.

How to keep AI-generated React UI consistent with a design system

A practical method for using semantic tokens, component rules, UI states, and review gates to keep generated React screens consistent.

Try this workflow in U2C

Create a React + Tailwind account settings screen using a consistent semantic design system. Include navigation, form controls, validation, save feedback, destructive actions, and responsive states. Reuse the same color, type, spacing, radius, and component rules throughout.

Start from this prompt

Translate brand preferences into semantic rules

A list of colors and a font name is not yet a design system. Generation becomes more predictable when those choices are assigned roles: background, surface, foreground, muted text, border, primary action, destructive action, focus ring, and status feedback.

The same applies to typography, spacing, and radius. Define a small hierarchy and explain where each level is used. Semantic rules give the generator constraints it can apply across different screen types instead of copying one visual example literally.

Specify component behavior as well as appearance

Document how buttons, inputs, tables, dialogs, navigation, cards, and feedback states behave. Include density, label placement, icon usage, focus treatment, validation, destructive confirmation, empty states, and loading patterns.

When multiple generated pages share those rules, reviewers can focus on product decisions rather than repeatedly correcting basic styling and component composition.

Bind the system to the project workflow

U2C Design DNA stores semantic colors, typography choices, component rules, and generation constraints. Binding it to a project gives later screens and follow-up edits the same baseline without pasting a long style prompt into every request.

A saved system should still be versioned deliberately. If a color role, radius, or component rule changes, review the effect on existing screens before treating the new value as the default.

Use repeatable review gates

Review generated screens for token usage, component consistency, hierarchy, responsive composition, accessibility states, and edit locality. A targeted edit should not silently restyle unrelated sections.

Track failures by category and update the system rule that would prevent them. This turns one-off corrections into reusable guidance and makes future generation more consistent.

FAQ

Is a prompt enough to enforce a design system?+

A prompt can describe preferences, but reusable semantic roles and component rules are more reliable across multiple screens and follow-up edits.

What should Design DNA include?+

Include semantic colors, typography hierarchy, spacing and radius guidance, component behavior, state patterns, accessibility requirements, and explicit generation constraints.

How do I know whether generated screens are consistent?+

Use the same review rubric for every screen and track repeated violations. Fix the shared rule when the same inconsistency appears more than once.

Related guides