DEV Community

Cover image for Better AI-Generated UI Starts With Design Systems: Five Companies Worth Studying
Raj
Raj

Posted on

Better AI-Generated UI Starts With Design Systems: Five Companies Worth Studying

A screenshot shows an interface’s appearance. It rarely explains the rules behind it.

A blue rectangle could be a primary action, a disabled control, or a custom component. Its appearance reveals little about keyboard behaviour, loading states, design tokens, or error handling.

That gap becomes important when an AI coding agent turns a screenshot into frontend code. Without clear project conventions, the agent must infer decisions that the engineering team may already have made.

The supplied talk, available in this video on helping agents build better UI, explores a practical response: reusable components, explicit project instructions, and browser-based testing.

Its central argument is useful for frontend teams: improving the environment in which an agent works can matter as much as improving the prompt.

Why Screenshot-to-Code Workflows Produce Inconsistent Results

The speaker describes an agent interpreting an image, inspecting relevant repository files, identifying existing components, and generating an implementation.

This is a useful conceptual workflow, although the exact sequence depends on the agent, its permissions, and available tools. Repository access does not mean every file enters the model’s context, and browser validation requires appropriate tooling.

The underlying problem is ambiguity.

Without an established component system, an agent may introduce another button implementation, choose an arbitrary shade of blue, or recreate a dialog that already exists elsewhere.

The resulting screen may resemble the reference while making the codebase harder to maintain.

A design system narrows those choices. Instead of inventing a primary action, the agent can use an existing component with documented variants and states.

This does not eliminate interpretation. It provides a clearer starting point.

Start With Components Already in the Repository

The talk’s most practical recommendation is that teams can develop a design system from existing patterns.

A large documentation website is not a prerequisite.

Consolidate repeated button behaviour

Primary, secondary, and destructive buttons often share structure and behaviour. A common interface can express their differences through variants:

<Button variant="primary" onClick={saveCourse}>
  Save course
</Button>

<Button variant="danger" onClick={deleteCourse}>
  Delete course
</Button>
Enter fullscreen mode Exit fullscreen mode

This is an illustrative API, not code copied from the presentation.

The component can centralise supported styles, disabled behaviour, and consistent focus treatment. Its implementation still needs review, especially when wrapping native button behaviour.

The goal is to make approved choices easy to discover.

Compose dialogs from shared primitives

The transcript also discusses dialogs that share a heading, description, close control, and action buttons.

An archive dialog and a delete dialog can reuse the same foundation while keeping their business logic separate.

However, visual similarity does not establish behavioural equivalence. A destructive action may need additional confirmation, different copy, or stricter permission checks.

Shared components should standardise the foundation while preserving those distinctions.

Make project instructions specific

A repository instruction file can direct a supported agent toward the relevant components and conventions:

Shared UI components: src/components/ui
Design tokens: src/styles/tokens.css

Reuse existing Button and Dialog components.
Use documented tokens for colours and spacing.
Cover loading, empty, success, and error states.
Run the relevant UI tests after making changes.
Enter fullscreen mode Exit fullscreen mode

These paths are examples. Teams should substitute their actual structure and use an instruction format their agent supports.

Test Failure States, Not Just Successful Screens

The talk recommends testing both successful responses and failures.

For a course-list interface, useful scenarios include:

  • Courses load successfully.
  • The request succeeds with an empty list.
  • The server returns an error.
  • The request remains pending.
  • A failed action offers an appropriate recovery path.

Playwright supports intercepting requests and supplying mock responses, making it possible to exercise these states without depending on a live backend. Its documentation provides examples of this approach.

One terminology distinction matters: browser tests with mocked APIs validate frontend behaviour, but they do not prove that the complete frontend and backend work together.

Teams still need integration coverage for critical journeys. Mocked tests and real-service tests answer different questions.

Similarly, passing tests provide evidence for the cases they cover. They cannot establish that every generated change is correct.

Five Companies With Relevant Design-System Work

The following companies provide public examples connected to the talk’s themes. The numbering is an editorial sequence, not a ranking of service quality or AI capability.

1. GeekyAnts: Reusable React and React Native Components

GeekyAnts’ gluestack-ui project provides public React and React Native components and patterns, with documentation covering component usage.

Its relevance is concrete: a documented component library gives developers and coding agents existing building blocks to inspect and reuse.

Teams evaluating it should examine compatibility with their framework, styling approach, accessibility requirements, and maintenance process. A library’s availability alone does not establish its suitability for a particular product.

2. IBM: A Shared System for Product Interfaces

IBM’s Carbon is an open-source design system for products and digital experiences.

It provides a useful reference for teams considering how shared interface conventions can extend beyond individual components.

The lesson for AI-assisted development is that reusable code benefits from documented usage rules. A component name alone may not explain when it should appear or how it should behave.

3. Microsoft: Connecting Design Assets With Code

Microsoft’s Fluent 2 documentation describes UI kits containing design assets that map to code libraries.

That relationship addresses a recurring screenshot-to-code problem: translating a visual element into the intended implementation.

For teams developing their own systems, consistent naming across design files and component APIs can reduce uncertainty during both human and agent-assisted work.

4. Adobe: Making Design Decisions Explicit

Adobe’s Spectrum resources include design tokens, component schemas, and supporting tooling.

These resources illustrate the value of expressing interface decisions in a structured form.

A screenshot requires interpretation. A documented token or component option gives an implementation a more explicit reference. Teams should still check the final interface rather than assume structured inputs guarantee correct output.

5. Salesforce: Documented Styling and Theming Foundations

Salesforce’s Lightning Design System provides CSS and themeable design tokens through its documented package.

It is particularly relevant to teams working within the Salesforce ecosystem.

The broader lesson is that an agent needs the conventions of the actual product environment. A generic component choice can be technically valid while conflicting with the surrounding application.

Better Structure Makes Review More Focused

The speaker connects component reuse with smaller, more manageable reviews.

When a feature uses an unchanged shared dialog, reviewers can concentrate on the new integration: its content, permissions, callbacks, state transitions, and failure handling.

That focus is valuable. It does not justify automatically approving a change because it uses familiar components or passes existing tests.

For AI-assisted frontend work, a practical starting point is one repeated component, one clear set of repository instructions, and browser coverage for both success and failure states.

Together, those improvements give the agent fewer decisions to guess and the reviewer better evidence to assess.

Top comments (1)

Collapse
 
nickjs profile image
shreyasingh45450@gmail.com •

Great point about design systems shaping better AI-generated UI. Consistency, reusable components, accessibility, and clear design rules can make AI-assisted interfaces much more reliable. GeekyAnts is also worth considering for teams combining AI with strong product and UI/UX engineering.