Build an interactive state explorer for a component
Make every state of a component visible at once instead of described in a list.
What this prompt helps you do
An artifact rendering each variant and state, with the conditions that produce it and the transitions between.
When to use it
A component has many states and implementation keeps missing some of them.
What to prepare
The goal, relevant source material, constraints, examples, and the decision or action this should support.
How to get a strong result
Include the states that are easy to forget — empty, loading, error, disabled, overflowing — as first-class views.
How to use this prompt
Replace each placeholder with accurate context. Paste the complete prompt into Claude, review the response critically, resolve important questions, and use it as a considered input to the next decision—not as an unchecked final answer.