Skillux

FIELD GUIDE / Design systems

How to keep AI-generated UI consistent across pages

Design drift becomes visible when a new screen invents another button style, spacing scale or name for the same action. A written instruction helps, but consistency also depends on the code the agent reuses and the examples it sees.

By Skillux · Published · Updated · 4 min read

01

Separate three layers of consistency

Visual consistency covers type, space and color. Component consistency covers the way controls are assembled and behave. Language consistency covers what the same action is called. Fixing a palette alone will not resolve conflicting action labels or different validation patterns.

Create an inventory of repeated elements across two or three important screens before defining new rules. Note which differences communicate meaning and which appear accidental. Different status colors may be purposeful; three nearly identical neutral button variants may not be.

02

Create semantic values with clear ownership

A semantic name such as text-muted or surface-raised communicates intent better than a page-specific color name. Map those roles to actual values in one place. Review contrast in each actual foreground and background pairing when changing the mapping.

  1. Inventory current text, spacing, color and radius values.
  2. Consolidate accidental duplicates into a small role-based vocabulary.
  3. Connect components to those values instead of copying literal styles.
  4. Document exceptions, including the condition that justifies each one.

03

Describe component contracts

For a button, document variants, size options, loading behavior, disabled behavior and accessible naming. For a field, include the label, help text, error text and how each is associated. A screenshot captures only one state of that contract.

Give the coding agent a known implementation to reuse. Request that it inspect existing components before creating equivalents. If a feature needs an exception, ask it to explain why the available variants cannot express the requirement.

04

Run a small drift review after generation

Review a list view, a detail view and a form together. Compare identical actions and shared controls, then inspect long labels, errors and loading states. A new page can look consistent at rest and still diverge during use.

Record the accepted reference and the rules used for the review. Neither a skill file nor a component library guarantees compliance with a design system: generated changes still need inspection. Recheck the shared consumers after modifying a token or component contract.

Worked example

One action, a recognizable identity

Illustrative consistency audit for a fictional project management application.

Starting point

The list page uses Add item, the detail page uses Create, and the empty state uses a plus icon with no name for the same task.

More actionable

Use the shared create-item control with a consistent accessible name and a context-appropriate visible label. Reuse its loading and disabled behavior. Keep the list and detail layouts different where their tasks differ.

The decision aligns a recurring action without forcing every screen into the same composition. Confirm the accessible name matches the visible label where applicable.

Take into your next review

Review checklist

  • Repeated values have shared owners.
  • Recurring actions are recognizably identified across pages.
  • Component contracts describe interactive states.
  • New screens reuse existing implementations when suitable.
  • Intentional exceptions have a documented reason.

Common questions

Can a SKILL.md file guarantee consistent UI?

No. Instructions can communicate design intent, but implementation, available context and later changes still affect the output. Shared components and review make deviations easier to detect.

Does consistency mean every page should look the same?

No. Reuse visual roles and recurring interaction patterns while allowing different layouts for different tasks. Consistency should help recognition without obscuring meaningful differences.

How do I keep Tailwind spacing consistent in AI-generated pages?

Document a spacing scale and reuse component patterns for recurring groups. Inspect arbitrary values before replacing them, since some may be intentional. Consolidate accidental variations at the component or theme level instead of patching each page separately.

How do I stop AI from creating duplicate React components?

Point the agent to the component directory and request an inventory of matching implementations before adding another. Compare behavior and accessibility needs as well as appearance. Extend a suitable component; keep separate implementations when their purposes meaningfully differ.

Sources & scope

Primary references checked on November 15, 2026. These sources support the principles cited beside them. The workflow, briefs and checklists are Skillux editorial recommendations; the examples are illustrative, with no claimed performance results.

W3C Understanding documents explain individual success criteria; this article is not a complete WCAG conformance assessment. References do not imply endorsement of Skillux. Read our editorial approach.