Component states prompt

A component states prompt asks the AI to show every state of a button, form or card side by side: default, hover, focus, error, disabled, loading and success. AI tools design the happy path and skip the rest.

The prompt

Read DESIGN.md. For the [component, such as the booking form],
show every state side by side: default, hover, focus,
filled, error, disabled, loading and success.
Focus must be visible without relying on colour alone.
Error messages say what went wrong and how to fix it.
Use the same spacing and type as the rest of the system.

When to use it

For every form, button and interactive card, before launch. Do forms first, because that's where leads are lost.

Why it works

A generated form usually looks finished in its empty state. The problems show up when someone mistypes an email or the network is slow. Seeing all states at once makes the gaps obvious, and keeps them consistent across the site.

How to adapt it

  • Add an empty state for lists, search results and carts.
  • Ask for the keyboard order of the form fields.

Mistakes to avoid

  • Red text as the only error signal. Add an icon or words too.
  • A spinner with no words. Say what's happening.

Go deeper

The wording inside each state comes from the microcopy prompt. Web accessibility explains why visible focus matters. This prompt is part of the design stage. It follows the AI website design prompts guide and the six steps in how to use AI to design a website.

Read the prompts guideAll 24 prompts

Related prompts

Microcopy prompt

A microcopy prompt rewrites the small words on a page: buttons, labels, hints and error messages. Buttons say what happens next, and errors say what went wrong and how to fix it.

Get the prompt

Mobile layout prompt

A mobile layout prompt asks the AI to show a page at phone width with clear rules: one column, readable text, tap targets with space around them, and the main button on the first screen.

Get the prompt

Accessibility audit prompt

An accessibility audit prompt asks the AI to check a page against WCAG 2.2 AA and list each failure with its element and fix, then apply only those fixes. It's a fast first pass before a real checker.

Get the prompt

DESIGN.md prompt

A DESIGN.md prompt asks the AI to write your design rules into one plain-text file: colours, type, spacing, layout and a never list. Every later prompt points to that file, so screens stay consistent.

Get the prompt

Want this done for you?

Losing leads in your forms? Book a call and I'll go through them with you.

Book a 20-minute call