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.