Visual States
Every interactive element needs a defined appearance for every state it can be in, and most designs specify only two.
Definition
Visual states describe how a component looks in each condition: rest, hover, focus, active, selected, disabled, loading, error and read-only. Undefined states become implementation decisions, which is how inconsistency enters a product.
Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.
On this page
The states to specify
| State | Trigger | Notes |
|---|---|---|
| Rest | Default | Must already signal that the element is interactive. |
| Hover | Pointer over | Does not exist on touch. Never the only cue. |
| Focus visible | Keyboard focus | Mandatory. WCAG 2.4.7, with appearance requirements in 2.4.11. |
| Active or pressed | During the press | Brief. Confirms the input was received. |
| Selected | Persistent choice | Must differ from hover and from focus. |
| Disabled | Unavailable | Explain why. Frequently fails contrast, so do not rely on it alone. |
| Loading | Operation in progress | Prevent double submission and announce to assistive technology. |
| Error | Validation failure | Needs text, not only colour. |
| Read-only | Viewable, not editable | Different from disabled: content should still be selectable. |
Combined states are where bugs live
- Selected and disabled together.
- Focused and in error together.
- Hovered and loading together.
- Selected and hovered, where the two treatments can cancel out.
- Specify the precedence order explicitly, or each implementation will invent its own.
In practice
Disabled buttons with no explanation
FormsA disabled submit button tells the user nothing about what is missing. Either keep it enabled and show specific errors on submission, or state the blocking condition next to it.
Sources
Where a source establishes something narrower than the popular reading of it, the note says so.
Understanding Success Criterion 2.4.11: Focus Appearance
W3C, WCAG 2.2
MDN Web Docs
Continue from here
Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.
Principles behind this
The reasoning this solution is an application of.
- Affordances and SignifiersPrinciple
- ConstraintsPrinciple
- FeedbackPrinciple
Often used with
These usually appear in the same screen or the same decision.
- Product SpecificationTemplate
- User FlowTemplate
- Figma Dev ModeTool
- StorybookTool
Short definition
The one-paragraph version, for when that is all you need.
- Acceptance CriteriaTerm
- Design QATerm
- HandoffTerm
- MicrointeractionTerm
- SignifierTerm
- StateTerm
Related concept
Connected closely enough to change how you apply this.
- Focus IndicatorsAccessibility
- Keyboard NavigationAccessibility
- Design System to DocumentationAI workflow
- Feature Idea to UX SpecificationAI workflow
- Component Anatomy, States and VariantsDesign system
- Component API DesignDesign system
- Design System DocumentationDesign system
- Design TokensDesign system
- MotionUI foundation
- SimilarityUI foundation
- Error MessagesUX writing
- Design HandoffWorkflow
- Design QAWorkflow