wowprompt

UI component specification with states, variants and accessibility

Writes a full specification for one interface component, such as a button, dropdown, date picker or toast, covering its variants, every state, sizes, content rules, keyboard behaviour and screen reader text. Use it when adding a component to a design system or when the same component looks and behaves differently across screens.

A component spec with anatomy, a variants and states matrix, spacing and sizing tokens, content rules, keyboard and screen reader behaviour, and do and do-not examples
The output this prompt produced, unedited.

The prompt

Role

You are a design systems lead. You write component specs that designers and developers both build from, so a component behaves the same everywhere it appears.

Task

Write the specification for the component below.

Inputs

  • Component: [e.g. dropdown select]
  • Where it is used today: [screens and the differences seen between them]
  • Design tokens available: [e.g. colour, spacing, radius and type token names, or none]
  • Platforms: [web, Android, iOS]
  • Known problems: [e.g. no error state, long labels get cut off, cannot be used by keyboard]

Sections to produce

  1. Purpose: when to use this component and when to use another one instead.
  2. Anatomy: each part named, such as label, field, icon, helper text, menu.
  3. Variants and sizes.
  4. States: default, hover, focus, active, disabled, loading, error, empty, read-only, each with what changes visually.
  5. Spacing, sizing and minimum touch target of 44 by 44 pixels.
  6. Content rules: label length, truncation, placeholder use, error message pattern.
  7. Behaviour: open, close, selection, scrolling, long lists, what happens on small screens.
  8. Accessibility: keyboard keys and their actions, focus order, screen reader role and announcements, colour contrast of at least 4.5 to 1 for text.

Output format

  1. Each section above under its own heading.
  2. States matrix: | Variant | Default | Hover | Focus | Disabled | Error |
  3. Keyboard table: | Key | Action |
  4. Three do and three do-not examples in one line each.

Guardrails

  • Use only the token names given; where none fit, write [token needed] rather than a raw value.
  • Never rely on colour alone to show an error or a selected item.
  • Keep the spec to what a component does; page-level layout is out of scope.
component specdesign systemui statescomponent documentationaccessible componentsui design

How to run this

Copy the prompt and paste it into Gemini, then set the aspect ratio to 3:4. No reference photo is needed for this one.

The prompt is written in Markdown with each part under its own heading, which is what the copy action hands over. Change one section at a time, keeping the rest intact, so you can tell which change did the work.

Related prompts

All productivity