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.
| Variant | Emphasis | Use it for | How many per screen |
|---|---|---|---|
| Primary | highest (filled) | the one main action — Save, Continue | exactly one |
| Secondary | medium (tonal/outline) | the alternative — Cancel, Back | a few |
| Ghost / tertiary | low (text only) | minor actions that shouldn't compete | as needed |
| Destructive | high but red | delete / irreversible actions | rare; confirm first |
| Icon | compact | toolbars, close buttons — needs an accessible name | as needed |
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.
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.
| Control | Reach for it when | Takes effect |
|---|---|---|
| Toggle / switch | a single on/off that applies immediately | instantly |
| Checkbox | one or more options, applied on submit | on submit |
| Radio group | 2–5 mutually exclusive options, all visible | on submit |
| Segmented control | 2–5 options you want side-by-side (a view switcher) | instantly |
| Select / dropdown | many options where seeing all at once is noise | on submit |
| Combobox / autocomplete | a long, searchable list (countries, users) | on submit |
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.
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.
01 Learning objectives
0 / 6 done02 Curated reading
03 Knowledge check
- 01easy
How many primary buttons should a single screen have?
- 02easy
A placeholder (grey hint text inside a field) can stand in for the field's label.
- 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.
-
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'.
Follow-ups they push on- When is a segmented control better than a dropdown?
- Why is a dropdown a poor choice for a yes/no?
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 ↗