> cs·fundamentals
interview 0% 28m read
8.6 ★ core [B][J] 1 interview Q's

UX patterns: what to use where

The quiet make-or-break decisions — modal vs page, table vs cards, dropdown vs radios, pagination vs infinite scroll. Each has a right answer most of the time.

These are the decisions that quietly make or break a product: should this be a modal or a page? a table or cards? a dropdown or radio buttons? infinite scroll or pagination? Each has a right answer most of the time, and getting them wrong makes an app feel clumsy even when every feature works. This chapter is the decision rules — say which pattern you want and why, and the AI builds the one that fits.

The most over-reached-for pattern is the modal. Reach for a modal only when the user must make one short, focused decision before continuing — a confirm, a quick create. Use a full page when the work is complex, multi-step, or should be deep-linkable (you can share or bookmark the URL). Use inline editing when someone’s just changing one value in place. Stacking modals on modals, or cramming a whole multi-step form into a dialog, is the clearest “didn’t think about it” smell.

A decision tree: must the user decide before continuing leads to modal; otherwise is it complex or deep-linkable leads to page; otherwise inline edit.a user action needs a surface…must they decide before continuing?modalcomplex or deep-linkable? → page · else inline
FIG 1 · choosing the container for an action A two-question decision: must they decide before continuing, and is the work deep enough to deserve a URL?

Table, cards, or list? Pagination, infinite, or load-more?

For showing a collection: a table wins when rows are comparable and you scan down columns (transactions, users). Cards win for visual or heterogeneous items where each has an image or varies a lot (products, dashboards). A plain list is right for simple linear items. Watch the mobile reflow — a wide table is miserable on a phone and often wants to become cards there. For loading more of a collection: pagination suits findable, referenceable data (search results you might cite “page 3”); infinite scroll suits endless feeds; and a load-more button is the safe default that avoids infinite scroll’s broken footer and lost-scroll-position problems.

DecisionReach for A whenReach for B when
Table vs cardsrows are comparable, you scan columnsitems are visual/varied, each is rich
Dropdown vs radiosmany options; seeing all is noise≤5 options worth showing at once
Pagination vs infinitefindable/referenceable dataan endless feed to browse
Tabs vs accordiona few peer sections, one at a timemany sections, or tight mobile space
Toast vs inline errortransient confirmation (“Saved”)a problem tied to one field/action
Each row is one sentence you can hand the AI to get the right pattern.
On the left, the same records shown as a table with header row and rows of cells; on the right, the same records shown as a grid of cards.table · comparable rowsNameStatusOwnerAcmeactiveAdaBetapausedLinCorpactiveSamDeltaactiveOnocards · visual / variedAcmeactiveBetapausedCorpactiveDeltaactive
FIG 2 · the same data, as a table vs as cards A table wins when rows are comparable and you scan columns; cards win when each item is visual or varied. Same data, different call.

Tabs vs accordion, and where to put the message

Tabs are for a few peer sections viewed one at a time (Profile / Billing / Security). An accordion is better when there are many collapsible sections or space is tight, as on mobile, where a row of tabs would overflow. And match your notification to its severity and lifespan: a toast for a transient success (“Copied”), a banner for an ongoing condition the user should keep seeing (“Payment failed — update your card”), and an inline error for a problem attached to a specific field or action. A critical error the user must act on should never be a toast that vanishes in three seconds.

01 Learning objectives

0 / 6 done

02 Curated reading

03 Knowledge check

knowledge check3 questions · pass ≥ 70%
  1. 01easy

    A critical error the user must act on should be shown as…

  2. 02medium

    A complex, multi-step, shareable (deep-linkable) flow should be a…

  3. 03medium

    For findable, referenceable data (e.g. search results), prefer…

04 Interview questions

browse all ↗

What gets asked on this topic — tap a card for how to approach it, the follow-ups, and the trap. Company tags are best-effort & sourced.

  • ★ must-know Commonly asked mid concept common How do you decide whether something should be a modal or its own page?

    Use a modal only for a short, focused decision the user must resolve before continuing — a confirm, a quick create. Use a full page when the work is complex, multi-step, or should be deep-linkable (shareable/bookmarkable by URL). The tell that you've reached for the wrong one is a modal that scrolls, has multiple steps, or that you wish you could link someone to — all signs it wanted to be a page. Inline editing covers the third case: changing a single value in place.

    What a strong answer covers
    • Modal = one short, focused, blocking decision.

    • Page = complex, multi-step, or deep-linkable work.

    • Inline = changing a single value in place.

    • A scrolling/multi-step modal is a page in disguise.

    Quick self-check

    You're building a 3-step 'create project' flow users may want to share a link to. Modal or page?

    Red flag Reaching for a modal by default — it's the most over-used pattern, and complex flows crammed into one feel cramped and can't be linked to.

    source: NN/g — Modal & Nonmodal Dialogs: When & How to Use ↗