UI/UX Best Practices

Interface rules that increase perceived quality and conversion without surprising the user. The basic behavioral contract of product design.
Critical

Clarity beats cleverness

Why it matters

Users don't come to learn your UI; they come to get something done. Creative but opaque interactions kill function.

How to apply

Button labels should carry verb + noun ('Download report' > 'Continue'). Icons alone are ambiguous; pair with text labels. Prefer everyday language over jargon.

Example
'Confirm delete' instead of 'OK', 'Cancel' instead of 'Discard' clarifies intent.
High

Use progressive disclosure

Why it matters

Showing everything at once creates cognitive load. Hiding options the user doesn't need right now preserves focus.

How to apply

Hide advanced settings behind 'More'. Focus each step of a multi-step form on one goal. Keep power-user features behind shortcuts or menus.

Example
Linear: task creation is tiny; the expanded textarea reveals priority/assignee/label fields.
High

Don't neglect empty states

Why it matters

A blank page makes new users feel lost. A good empty state teaches and triggers the first action.

How to apply

Illustration + short description + primary action. Use 'Create your first project' instead of 'No data yet'. Offer one-click sample data.

Example
Notion: new workspaces present 'Start from a template' and 'Blank page' to drive users to first value fast.
Critical

Show skeletons or progress for loading states

Why it matters

Users who think the screen 'froze' refresh or leave. Uncertainty is more painful than the actual wait.

How to apply

Show skeleton/spinner for operations > 100ms. Show % progress for > 1s. Optimistic UI: reflect the action immediately, reconcile when the server responds.

Example
GitHub: PR merge button becomes 'Merging...' with animation; after ~15s it flips to 'Merged'.
High

Error messages should guide, not blame

Why it matters

'Invalid input' tells the user nothing. A good error names the cause and suggests the fix.

How to apply

Inline validation; focus the offending field. Message should include 'what's wrong' + 'how to fix'. Avoid 'Something went wrong'; write context-specific text. Log 4xx silently, alert on 5xx.

Example
Wrong: 'Invalid password.' Right: 'Password must be at least 8 characters and include a number.'
High

Give visual feedback within 100ms

Why it matters

Interactions under 100ms feel instant; above that, delayed. Without visible acknowledgement, users click again.

How to apply

Every clickable needs :active + hover styles. On submit, disable the button + show spinner. Use debounce/throttle before triggering heavy work.

Example
Search box: 300ms debounce as the user types; don't fire a request per keystroke.
High

Design mobile-first — small screen isn't an afterthought

Why it matters

60% of global traffic is mobile. Designs that start on desktop get cramped on mobile and miss the real audience.

How to apply

Prototype at 360px first. Touch targets ≥44×44px. Mind safe areas (iPhone notch, home indicator). Responsive type via clamp().

Example
Bump a 40px hamburger in the navbar to 44px and add 12px padding to ease tapping.
High

Establish visual hierarchy — nothing can be equally important

Why it matters

With 5 CTAs, 3 colors, and 4 font weights on screen, the eye has nowhere to land. Without hierarchy, the UI is noise.

How to apply

Exactly ONE primary action per screen; secondary/tertiary fade visually. Scale: heading ≥ subheading ≥ body ≥ meta. Whitespace is half the hierarchy.

Example
In a modal, 'Yes, delete' is a solid red button; 'Cancel' is a ghost. Don't use two filled buttons.
Medium

Reduce choices (Hick's Law)

Why it matters

Decision time rises logarithmically with the number of options. 20 menu items are much slower than 3 grouped clusters.

How to apply

Group menu items under categories. Push advanced options back. Remove anything that doesn't deliver immediate value in onboarding. A/B test.

Example
VS Code command palette: one search box + fuzzy search to reach hundreds of commands without menu diving.
High

Balance undo and confirm

Why it matters

Confirm every action and friction explodes; confirm none and you'll cause accidental deletions. The right choice depends on reversibility.

How to apply

For reversible actions (archive, move), show an undo toast (Gmail-style 5 sec). For irreversible ones (permanent delete, payment), require explicit confirm + countdown or typed keyword.

Example
GitHub: deleting a repo requires typing the repo name; you can't click 'delete' by mistake.
Medium

Don't forget keyboard users — shortcuts for power users

Why it matters

Heavy users migrate to the keyboard. A product without shortcuts feels 'toy-like'; you lose the premium segment.

How to apply

Global search: Cmd/Ctrl+K. Save: Cmd/Ctrl+S. Help: ?. Surface shortcuts in button tooltips. Test clashes against browser defaults.

Example
Linear: G+I for Inbox, G+A for Active issues, C for new issue — keyboard-first throughout.
Medium

Support dark mode as a system rule

Why it matters

80%+ of users prefer dark mode. An app out of sync with system preference is labelled 'eye-hurting'.

How to apply

Start from prefers-color-scheme. Persist the choice in localStorage with a manual override. Define color tokens in two modes keeping contrast ratios.

Example
CSS custom properties: --color-text, --color-bg as primary tokens; values differ under [data-theme="dark"].