patternsUI/UX reference

UI/UX patterns

When to use each pattern, implementation details, and accessibility requirements.

Showing all 18 patterns
Overlays

Modal or a separate page?

Keep brief, contextual tasks in a dialog. Give complex work a page of its own.

Forms

When should a form show errors?

Explain constraints up front. Validate at a useful moment, then make recovery obvious.

Forms

Select menu or radio buttons?

Expose short lists. Use a select when space or a longer, familiar list makes it worthwhile.

Forms

One long form or multiple steps?

Split along meaningful task boundaries, not arbitrary field counts.

Forms

Toggle or checkbox?

Use toggles for immediate on/off settings. Use checkboxes for selections, agreements, or choices saved together.

Forms

Does this flow need a review step?

Let people check meaningful answers before committing to an important transaction.

Navigation

Tabs or page navigation?

Use tabs for peer views in one context. Use links for distinct destinations.

Navigation

When are breadcrumbs useful?

Show where a page belongs and offer a route to its parents.

Navigation

Search, filters, or both?

Search finds items using words or phrases. Filters narrow the collection by predefined attributes.

Feedback

Toast, banner, or inline message?

Match the message's placement and persistence to its importance and scope.

Feedback

Spinner, skeleton, or progress bar?

Represent what is known about progress and keep the layout stable.

Feedback

What should an error message say?

Explain the problem in plain language and preserve the work needed to recover.

Data & content

What belongs in an empty state?

Distinguish a fresh start, no matches, loading, and a failed request. They need different responses.

Data & content

Pagination or infinite scroll?

Choose based on whether users need a place they can return to or a continuous feed.

Data & content

Table or cards?

Tables support comparison across shared attributes. Cards support browsing distinct items.

Data & content

Accordion or visible content?

Hide secondary detail only when users can decide what to open from the heading.

Actions

Confirmation or undo?

Use undo for safely reversible changes. Confirm specific, irreversible consequences.

Actions

Button or link?

Links lead to resources or locations. Buttons trigger actions.