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

The visual vocabulary: naming every element

You can't direct what you can't name. The complete catalog of UI elements — buttons, fields, overlays, navigation — so “make it nice” becomes a precise request.

You can’t direct what you can’t name. “Make it nicer” gives the AI nothing; “use a ghost icon-button that opens a right-side drawer” gives it everything. This chapter is the catalog — the real names of the buttons, fields, overlays, and containers you see in every app — so your requests land on the first try and you can read what the AI built back to it.

Buttons: exactly one primary action per screen

Every screen should have a single, obvious primary action — the filled, high-contrast button your eye lands on. Everything else steps down in emphasis: secondary for the alternative, ghost (text/outline) for low-stakes actions, destructive (red) for delete, icon buttons for compact toolbars, and link buttons for navigation dressed as text. When a screen has three filled buttons of equal weight, nothing is the priority — that’s the most common “AI made this” tell.

VariantEmphasisUse it forHow many per screen
Primaryhighest (filled)the one main action — Save, Continueexactly one
Secondarymedium (tonal/outline)the alternative — Cancel, Backa few
Ghost / tertiarylow (text only)minor actions that shouldn't competeas needed
Destructivehigh but reddelete / irreversible actionsrare; confirm first
Iconcompacttoolbars, close buttons — needs an accessible nameas needed
Emphasis is the whole point: the variant tells the user what matters.
A row of buttons: a filled green primary, an outlined secondary, a text-only ghost, a red-tinted destructive, a small square icon button, and an underlined link button.SaveprimaryCancelsecondarySkipghostDeletedestructiveiconLearn morelink
FIG 1 · the button family Six variants in descending emphasis. The eye should land on the single filled primary first; everything else steps down.

A field is more than a box

When you ask for “an email input,” you’re really asking for five parts: the label (always visible), the field itself, an optional placeholder (a hint, not the label), helper text below it, and error text that replaces the helper when validation fails. Naming the parts means the AI builds the whole thing — not a bare box with grey placeholder text doing double duty as the label, which breaks the moment a user starts typing.

A labelled email input showing label above, the field box with placeholder text, helper text below, and an error-state variant.Email← label (always visible)you@example.com← placeholder (a hint)We’ll only email you about your account.← helper textnot-an-emailEnter a valid email address.← error state
FIG 2 · the anatomy of a field Five named parts. Most AI-built forms ship only the box and a placeholder — name the rest and you get them.

Choice controls: the count decides the control

There are six ways to let someone pick, and the right one is mostly a function of how many options and whether the choice takes effect now. Get this wrong and a form feels clumsy even when it works: a dropdown for a yes/no, or a toggle for something that only applies after you hit Save.

ControlReach for it whenTakes effect
Toggle / switcha single on/off that applies immediatelyinstantly
Checkboxone or more options, applied on submiton submit
Radio group2–5 mutually exclusive options, all visibleon submit
Segmented control2–5 options you want side-by-side (a view switcher)instantly
Select / dropdownmany options where seeing all at once is noiseon submit
Combobox / autocompletea long, searchable list (countries, users)on submit
Visible options ≤ 5 → radios or segmented. Many → select. Huge → combobox.
A toggle switched on, a checked checkbox, a radio group with the first option selected, and a segmented control with one segment active.toggle (on)checkboxradio groupDayWeekMonthsegmented control
FIG 3 · the choice controls A toggle (instant), a checked checkbox and a radio group (on submit), and a segmented control (a view switcher).

Overlays: four words that aren’t interchangeable

“Pop it up in a thing” could mean four very different elements. A modal blocks the whole page until you act — use it sparingly, for a decision that must happen now. A drawer slides in from an edge for a side task without leaving the page. A popover is a small panel anchored to what you clicked (a date picker, a menu). A tooltip is a tiny hover hint — text only, never essential info. And for notifications: a toast auto-dismisses; a banner stays.

Four small screen diagrams labelled modal, drawer, popover, and toast, each showing where the overlay appears relative to the page.modal · blocksdrawer · slides inpopover · anchoredtoast · transient
FIG 4 · overlays, by where they sit Same content, four different containers — pick by how much it interrupts and where it's anchored.

Containers and navigation, named

The rest of the catalog is the furniture. A card groups related content in a bordered block. A list is linear items; a table is comparable rows and columns. Tabs show one of a few peer sections; an accordion expands stacked sections. A badge or chip is a small status pill; an avatar is a user image. For getting around: a navbar (top), a sidebar (side), a breadcrumb (where am I), pagination (page N of M), a menu (a list of actions), and a command palette (the Cmd-K search-and-do box). You don’t need to build any of these — you need to name them.

A mock application screen: a navbar across the top, a sidebar on the left, and a content area with a breadcrumb, a row of tabs, and a card containing a badge — each region labelled in a colour key below.≡ AppDashboardProjectsSettingsProjects › AcmeOverviewFilesActivityActiveAcme redesignnavbarsidebarbreadcrumbtabscardbadge
FIG 5 · structural & navigation elements, in place The furniture, named in context — each element outlined in its own colour (see the key). This is the layout you describe when you brief a screen.

01 Learning objectives

0 / 6 done

02 Curated reading

03 Knowledge check

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

    How many primary buttons should a single screen have?

  2. 02easy

    A placeholder (grey hint text inside a field) can stand in for the field's label.

  3. 03medium

    A setting that takes effect the instant you flip it should be a…

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.

  • Commonly asked junior concept common How do you choose between a dropdown, radio buttons, and a segmented control?

    It comes down to how many options there are and whether seeing them all at once helps. Use radio buttons or a segmented control for ~2–5 options worth showing side by side; a dropdown/select when there are many and listing them inline would be noise; a combobox/autocomplete when the list is long and searchable (countries, users). A segmented control also implies an instant view switch, while radios are usually part of a form submit.

    What a strong answer covers
    • ≤5 options worth seeing at once → radio group or segmented control.

    • Many options → dropdown/select; huge + searchable → combobox.

    • Segmented control = instant switch; radios = part of a form submit.

    • Match the control to the option count, not just 'a picker'.

    Red flag Defaulting to a dropdown for everything — for two or three options it hides the choices behind a click for no reason.

    source: NN/g — Listboxes vs. Dropdown Lists ↗