Design & CreativeIntermediate2-4 hours per page

UI Prototype to Code

The problem with AI-generated UI is that it looks right while components, states and responsiveness are improvised. This skill fixes the design system and states first, then generates and verifies item by item.

Workflow

  1. 1

    Define components and tokens

    List required components, spacing, colors, type scale and radius, reusing the existing design system. Create tokens first if missing; do not let AI invent styles each time.

  2. 2

    Cover every state

    Specify default, hover, focus, disabled, loading, empty and error states for each component. AI usually generates only the default state; the state list is your acceptance criteria.

  3. 3

    Generate maintainable code

    Require reuse of project components and utilities, no new UI library; type the data and isolate interactions into functions. Run lint, type-check and build before visual tweaks.

  4. 4

    Accessibility and responsive acceptance

    Walk the focus order with a keyboard and check contrast, semantics, alt text and error messaging. Test layouts at 360, 768 and 1,440 pixels instead of eyeballing desktop only.

Recommended prompts

FAQ

Can AI-generated frontend ship directly?

No. Add states, types, error handling and accessibility, and test with real data and a build. AI output is a first draft.

Should I use v0 or Cursor?

v0 is good for exploring visual directions; Cursor is better for constrained changes inside an existing codebase. Fix the system first, then choose the tool.

Related skills