UX8: Interactive prototypes

Lesson 3 of 5 · reading 15–25 minutes; practice and project time is on the module page

Designing every state

🎯You'll be able to

List and design every state for each screen and component: default, hover, focus, selected, disabled, loading, empty, error and success.

🏠The everyday picture

A traffic signal isn't designed only for green. Red, amber, flashing amber and "out of order" all need a clear meaning.

📘What it really is

📝A worked example

Input: the reference component page (design-system/components.html).

Component States shown
Button default, secondary, focus, disabled, loading
Text field default, focus, error, disabled
Time slot default, selected, focus, disabled (booked)
Alert error, success, empty

Expected output: test 6 of npm run test:system checks that each of these states appears with data-component and data-state attributes. The starter's page shows only default states.

🌍Where it's used

📝Case scenario

A payment button had no loading state. On slow connections people pressed it twice and were charged twice. A loading state that disabled the button and said "Paying…", plus a check on the server, ended the double payments.

🖱️Try it

Make a state inventory for the details screen: list each component and mark which of the states above it needs. Success: at least six states marked, including loading for the "Book appointment" button.

⚠️Common mistakes

🛠️For your project

Project 3's test 6 checks every state of four components on the component page.

✅Quick check

Name four component states besides default.

Show the answer

For example focus, selected, disabled and loading (also hover and error).

What does a loading state on a submit button prevent?

Show the answer

Double submissions, and uncertainty about whether anything is happening.

← PreviousBuilding a clickable journey
ProLearners Assist