AI agents usually build the screen with perfect data. Real people meet the empty, slow and broken versions first.
Design every view for empty, loading, error and success
The happy path is one state out of at least four. The missing ones are the ones people remember.
✗ Don't
Empty not designed
Loading not designed
Error not designed
Ship a list that only works once data exists.
✓ Do
Before calling a view done, build and preview its empty, loading, error and success states.
Empty states explain what goes here and offer the next step
An empty screen is a new user's first impression. It should teach, not shrug.
✗ Don't
Show a blank area, "No data" or a lonely table header.
✓ Do
No projects yet
Create your first project to get started.
Create project
Say what will appear and add the action that fills it, for example "No projects yet" with a "Create project" button.
Loading keeps the layout stable
Content that jumps as it loads makes people click the wrong thing and feels broken.
✗ Don't
Flash a spinner for 50 ms, or let content push the page down when it arrives.
✓ Do
Reserve space for content and images. Use skeletons shaped like the final layout for waits longer than about 300 ms.
Errors explain what happened and offer a way out
A dead end makes people leave. A clear message and a retry keeps them going.
✗ Don't
Error 500
TypeError: Cannot read
properties of undefined
Show "Error 500", a stack trace or a white screen.
✓ Do
Couldn't load projects
Check your connection and try again.
Try again
Say what failed in plain words, keep the rest of the page usable, and offer "Try again" or another route.
Handle real-world content
Demo data is short and tidy. Real names are long, lists hold a thousand items, and images fail to load.
✗ Don't
A Annual-marketing-report-final-v3-approved.pdf Open
Let a long name break the layout or overlap buttons.
✓ Do
A Annual-marketing-report-final-v3-approved.pdf Open
Test with 0, 1 and 1,000 items, 60-character names, missing images and large numbers. Truncate with a tooltip or wrap on purpose.
These rules map to WCAG 2.2 level AA. They are the floor, not the goal.
Text has enough contrast
Low contrast text is hard to read for many people, on every screen, in sunlight. (WCAG 1.4.3)
✗ Don't
Your trial ends in 3 days
Upgrade to keep your projects and history.
2.6 : 1
Use light grey text on white for anything people need to read.
✓ Do
Your trial ends in 3 days
Upgrade to keep your projects and history.
7.8 : 1
Use at least 4.5:1 for body text and 3:1 for large text (24 px, or 18.5 px bold) and for UI components.
Everything works with a keyboard, and focus is visible
Keyboard and switch users need to reach every control, and see where they are. (WCAG 2.1.1, 2.4.7)
✗ Don't
Cancel Save
Tab Where is focus?
Set outline: none without a replacement.
✓ Do
Cancel Save
Tab Focus is clearly visible
Use native controls, keep the tab order logical, and style :focus-visible with a clear outline.
Images and icon buttons have text alternatives
A screen reader can't describe a picture or an icon it has no name for. (WCAG 1.1.1, 4.1.2)
✗ Don't
<button> <TrashIcon /></button>
Ship an unlabeled trash-can button, or alt="image".
✓ Do
<button aria-label ="Delete project" >
Give meaningful images descriptive alt text and decorative ones alt="". Give icon-only buttons an aria-label.
Never rely on color alone
About 1 in 12 men have some form of color vision deficiency, and sunlight, grayscale mode and poor screens wash color out for everyone. (WCAG 1.4.1)
✗ Don't
Bills
Electricity
Internet
Rent
Show status with a colored dot alone, or mark errors with only a red border.
✓ Do
Pair color with an icon and a word: a tick and "Paid", an alert and "Overdue", a clock and "Due soon".
Dialogs manage focus
If focus escapes a modal, keyboard and screen reader users get lost behind it.
✗ Don't
New project
Rename project
Q4 launch plan Cancel Save
Open a modal that leaves focus on the page behind it.
✓ Do
New project
Rename project
Q4 launch plan Cancel Save
Esc closes
Move focus into the dialog when it opens, keep it inside, close on Escape, and return focus to the trigger.
Respect reduced motion
Large or constant motion can cause nausea and distraction for people with vestibular disorders.
✗ Don't
New dashboard
Slides, spins and zooms in
Autoplay parallax or large movements with no way out.
✓ Do
New dashboard
Simple fade, no movement
prefers-reduced-motion: reduce
Wrap non-essential animation in @media (prefers-reduced-motion: no-preference), or tone it down under reduce.
Interface copy is design. Every word should help someone understand or act.
Buttons say what will happen
A specific verb tells people what they're committing to before they click.
✗ Don't
Invite teammate
They'll get an email with a link.
ana@acme.com Cancel Submit
Write "Submit", "OK", "Continue" or "Click here" when a specific verb exists.
✓ Do
Invite teammate
They'll get an email with a link.
ana@acme.com Cancel Send invite
Write "Save changes", "Send invite" or "Create project".
One name for one thing
If the same thing is called a project in one place and a workspace in another, people assume they are two different things.
✗ Don't
Mix synonyms like "remove" and "delete", or "team" and "organization", for the same action or object.
✓ Do
Pick one term per concept and use it in nav, headings, buttons, toasts and emails.
Use the user's words, not the system's
People think in tasks, not in how the product is built.
✗ Don't
ERR_SYNC_409
Conflict on entity page_7f3a
Show "Webhook config", "null" or "ERR_SYNC_409".
✓ Do
Couldn't save
Someone else edited this page.
Reload
Write "Notifications" and "Couldn't save. Check your connection".
Write in sentence case and plain language
Sentence case reads faster than Title Case or ALL CAPS, and plain words work for everyone, including non-native speakers.
✗ Don't
Change Your Password Now
New password UPDATE PASSWORD
Write "Change Your Password Now" or "Utilize the configuration panel".
✓ Do
Change password
New password Update password
Put the key words first, keep sentences short, and write "Change password".
Error messages explain, reassure and help, without blame
Errors are stressful moments. A vague or blaming message makes people feel stupid; a clear one keeps them going.
✗ Don't
Error: invalid request You entered the wrong card details.
Write "Error: invalid request", "You entered the wrong details" or "Something went wrong".
✓ Do
Your bank declined the payment
No money was taken. Try another card or contact your bank.
Use another card Get help
Say what happened and why, reassure where you can, and give the next step: "Your bank declined the payment. No money was taken. Try another card or contact your bank."
Most people will meet the product on a phone first. Design for thumbs, small screens and bad connections.
Touch targets are at least 44 by 44 px
Small targets cause mis-taps, especially in lists of links or icon rows. WCAG 2.2 AA sets 24 by 24 px as the minimum, and 44 px matches Apple's guidelines.
✗ Don't
Ship 16 px icon buttons placed edge to edge.
✓ Do
44 px hit area, with space
Give every tappable element a hit area of at least 44 by 44 CSS px, ideally 48 by 48, with at least 8 px between neighbors.
Works at 320 px wide without horizontal scrolling
Small phones and 400% browser zoom both end up around 320 CSS px wide. (WCAG 1.4.10)
✗ Don't
Name Owner Status Updated Q4 plan Ana Active 2 h ago
Use fixed-width containers that push the page sideways.
✓ Do
Q4 plan Ana · Active
Website Jon · Draft
Hiring Mia · Active
Let layouts reflow into one column, wrap long words and make tables scroll inside their own container.
Never disable zoom
People with low vision rely on pinch-zoom. Blocking it locks them out. (WCAG 1.4.4)
✗ Don't
<meta name ="viewport"
content ="width=device-width,
maximum-scale=1, user-scalable=no" >
Add user-scalable=no or maximum-scale=1.
✓ Do
<meta name ="viewport"
content ="width=device-width,
initial-scale=1" >
Use <meta name="viewport" content="width=device-width, initial-scale=1">. Set inputs to at least 16 px text so iOS doesn't auto-zoom them.
Keep primary actions within thumb reach
On large phones, the top corners are the hardest places to reach with one hand.
✗ Don't
Edit profile Save
Name Email Bio
Put the only "Save" button in the top-right corner of a long mobile form.
✓ Do
Put the main action of a mobile view near the bottom, for example as a sticky bottom bar or a bottom sheet.
Design first for the device where the core work happens
Mobile-first is a good default for quick interactions, but tools for writing, analysis or finance deliver most of their value on a large screen with a keyboard.
✗ Don't
Budget model
Q1 1237 1274 1311 Q2 1385 1422 1459 Q3 1533 1570 1607 Q4 1681 1718 1755 Q1 1829 1866 1903 Q2 1977 2014 2051
Squeeze a spreadsheet-heavy finance tool into a phone layout first, just because "mobile-first" is the rule.
✓ Do
Q1 Q2 Q3 Q4 Revenue 1422 1459 1496 1533 Costs 1607 1644 1681 1718 Profit 1792 1829 1866 1903
Decide where the most important task is done, design that experience first, then adapt it to the other devices.
Visual design is how people tell what matters. These rules are about clarity rather than taste. For brand and tokens, use your DESIGN.md.
One primary action per view
When everything is emphasized, nothing is. One clear primary action tells people what to do next.
✗ Don't
Put three filled buttons of the same color side by side.
✓ Do
Use one filled primary button per view or section, with secondary and tertiary styles for the rest.
Build hierarchy with size, weight and space before boxes and color
Borders, cards and colors added everywhere create noise. Space and type create order.
✗ Don't
Wrap every element in a card, or put cards inside cards.
✓ Do
Billing
Plan Pro · 99 kr/mo
Next invoice 1 Dec
Change plan
Group related items with proximity, separate sections with whitespace, and rank content with type size and weight.
Use tokens, not one-off values
One-off spacing, colors and font sizes add up to an interface that feels slightly off everywhere.
✗ Don't
<div className ="mt-[13px] p-[7px]
text-[#7a5cff] rounded-[5px]" >
Hard-code margin: 13px or a hex color that isn't in the palette.
✓ Do
<div className ="mt-3 p-2
text-primary rounded-md" >
Take spacing, color, radius and type from the design tokens in DESIGN.md or your theme.
Avoid the generic AI look
People have learned to spot default AI-made UI, and it reads as low effort.
✗ Don't
✨🚀 AI-powered insights
Unlock the magic of your data
Get started ✨
Default to purple-blue gradients, emoji as icons, centered everything, glassmorphism or a sparkle icon on every feature.
✓ Do
Weekly revenue Nov 21–28
48 210 kr
+12% from last week
Start from the product's own content and brand. Use icons from one consistent set.
Opening an overlay never shifts the page
Many modal and drawer libraries hide the scrollbar to stop the page scrolling. The page gets about 15 px wider and everything behind it jumps sideways.
✗ Don't
body { overflow: hidden; }
/* page jumps ~15 px sideways */
Lock scrolling with overflow: hidden and let the layout jump each time a modal opens and closes.
✓ Do
html { scrollbar-gutter: stable; }
/* space stays reserved, nothing moves */
Reserve the scrollbar space once with html { scrollbar-gutter: stable; }, or compensate for the scrollbar width when locking scroll.
Name color tokens by their role, not their appearance
Names like blue-500 say what a color looks like, not when to use it, so people guess, and the palette drifts.
✗ Don't
color: var(--blue-500);
background: var(--grey-100);
border-color: var(--red-400);
Reference raw palette colors like blue-500 or grey-100 directly in components.
✓ Do
color: var(--text-accent);
background: var(--surface-subtle);
border-color: var(--border-danger);
Name tokens by element and purpose, such as text.danger, surface.subtle or border.accent.strong (element, tone, emphasis, state, at most four parts).
Put actions close to what they act on
Fitts's law: the farther and smaller a target, the longer it takes to reach. Actions far from the content make people hunt and travel.
✗ Don't
Edit profile Save
Name Email Bio
Put the only "Save" button in the top corner, far from the end of a long form.
✓ Do
Edit profile
Name Email Bio Cancel Save
Place the submit button right after the last field, and row actions on the row itself. Make frequent actions larger and easier to reach.
Align everything to a consistent grid
Edges that almost line up look accidental. A shared grid makes layouts feel calm, consistent and professional.
✗ Don't
Team
Search members
Ana Jensen Admin
Jon Holm Editor
Nudge elements a few pixels by eye, so left edges and gaps drift between sections.
✓ Do
Team
Search members Ana Jensen Admin
Jon Holm Editor
Use a column grid and a spacing scale, and align text, inputs and cards to the same edges.