Which Control, the Box & the Hit Area — three small controls that answer three different questions, measured until their size, their alignment, their target and their label stop being anyone's guess.
The choice is decided by when the answer takes effect and how many answers there are. A checkbox is an independent yes or no that takes effect when the form is submitted. A radio group is one answer from a small exclusive set, two to five, all visible. A toggle is a binary setting that takes effect the moment it moves, with nothing to submit.
The industry converged on this split years ago, and the systems agree almost word for word. Carbon says toggles are only used for binary actions that occur immediately, and Atlassian says that for options that require a button press to apply the setting, use a checkbox. Convergence happened because the toggle borrows a physical metaphor, the light switch, and a light switch that does nothing until you press a second button is broken. The checkbox borrows the paper form, where nothing happens until you hand it in. The two are told apart by commit timing, and a control that lies about its timing makes users distrust every control on the screen.
Each of the four mistakes below is common in shipped products, and each one has its fix beside it. The content is the same in both frames of a pair. Only the control changes.
A toggle in a form sets up two commit models on one screen: the toggle looks applied, and the Save button says nothing is. Users who flip it and then cancel the form believe the setting changed. Seven radios spend over 200px of the form to show options the user needs to see only while choosing; above five, the options belong in a select, which is Select Part I §I's spectrum. The exception is a set whose options carry a description each and must be compared, which stays visible as radios with helper text or as selectable cards (§XI). A checkbox that applies at once gives the user no evidence that anything happened and no button to look for; the toggle's moving knob is that evidence. Two radios for a yes/no double the reading, put a negative sentence on screen, and make the user choose an option to decline. One checkbox says the same thing in five words, and unchecked means no.
Yes/no radios still have one proper use: a required question where neither answer may be the default, so the user must make a choice before continuing. The GOV.UK Design System asks such questions with two radios and pre-selects neither. A checkbox can't do that, because its unchecked state already counts as an answer.
| Question | Checkbox | Radio group | Toggle |
|---|---|---|---|
| Takes effect | On submit | On submit | Immediately |
| Answers | Independent; 0 to all | Exactly one of 2–5 | On or off |
| Needs Save | Yes, always | Yes, always | Never |
| Default | Unchecked (opt in) | None, if the answer must be chosen | The current state |
| Role | checkbox | radio in a group | switch on a checkbox input |
| Keyboard | Tab to each; Space | One tab stop; arrows move and select | Tab; Space |
| Third state | Mixed, parents only (§VII) | None | None |
The boundary with neighbouring chapters, stated once. Every token here is inherited. The 4px base unit and the nesting rule come from Spacing. The hairline, its strong alpha, the radius steps and the focus ring come from Border Part I §V and §VIII. Durations and the move curve come from Motion Part I §II, and the UI voice and the label, value and helper roles from Typography Part I §III and Part III §III. Label placement for text fields is Text Inputs Part I §VI; checkboxes inside a dropdown, and the select-all row of a listbox, are Select Part II §III–IV; table columns are Grid & Layout Part III §II.
At the UI voice, 13px text on 20px leading, the box is 16px, the radio is 16px, and the toggle track is 32 by 18. Each control sits 2px (the toggle 1px) below the top of its label's first line, so its center is the line's center. The formula is (leading − control) / 2, and it holds at every density posture.
16px is the box at 13px text because it is the cap height plus enough room for a 2px mark to read. DM Sans capitals at 13px are about 9px tall, so a 16px box is a little under twice the cap height, and the box reads as a mark at the size of the text rather than a button beside it. A 20px box beside 13px text is louder than the label it belongs to; a 12px box is smaller than a lowercase letter's footprint and its check drops to a smudge. Carbon, Atlassian, and shadcn/ui all ship a 16px box beside 14px or smaller text.
The mark is drawn, not typed. A check glyph from the font changes shape with the face and sits on the font's baseline, not the box's center. The mark here is a 2px stroke with round ends, inset 4px from the box's sides, so it keeps one weight with the 2px focus ring and the 2px selection edge (Border I §V). The radio's dot is 6px, 1px of edge plus 4px of ink on each side of a 16px ring. Below 5px the dot disappears at a glance; above 8px the ring becomes a thin outline around a disc, and checked starts looking like the toggle's knob. The toggle's knob travels 14px: track 32, knob 14, 2px of inset at each end. The travel is longer than the knob is wide, so the two positions can't be mistaken for each other.
The control steps with the UI voice, so the density posture changes all three at once (Spacing I §VII). Each posture keeps the same relationship: the control is a little under the line's leading, and centered on the first line.
The box's center goes on the center of the label's first line, which in DM Sans is also the center of the capitals: at 13/20 the line's center is 10px down and the capitals' center measures about 9.5px (9.45 by raster; Iconography I §III measures the same line), half a pixel that no whole-pixel offset can close. Three other placements are common, and all three are wrong. The rows below are drawn at 3× so the error is visible; the dashed line is the text line's center and the solid line is the box's.
Flex start with no offset puts the box's top on the line box's top, 2px above where it belongs. Baseline alignment is what an inline native checkbox and align-items: baseline both do: a box has no text, so its baseline is its bottom edge, and the bottom lands on the text's baseline. In the browser that raises the box 4px against the line, until its top sits 2px above the line box and 7px above the capitals. Centering the box on the whole label looks right for one line and fails the moment a label wraps: the box slides down to the middle of the paragraph and stops pointing at the line that starts the sentence. Only the formula holds in all three cases: align to the start, offset by (leading − box) / 2.
The shapes are one decision, made once, from the system's radius character (Border I §X). Inside that decision two things are fixed by convention and never traded: the checkbox and the radio differ in shape from each other, and the toggle reads as a thing that slides, not a thing that fills. Everything else, from the box's corner to the knob's finish, is a parameter the system sets once and then holds.
The box means "any of these" and the circle means "one of these". The industry converged on that pairing because the shape carries the behaviour before the user reads a label: a column of circles says pick one, a column of squares says pick any, and a user who has seen either a thousand times doesn't stop to check. A circular checkbox or a square radio isn't a style. It changes what the control says it does, and the user finds out by clicking. The toggle's fixed point is the same kind of promise. Its knob travels along a track, and the travel is how the user knows the setting applied (§VIII). A toggle that only changes fill, or one squared off until it looks like two buttons, has lost the slide, and with it the reason to use a toggle at all.
Each honest set picks its values from one character. Sharp squares the box and the frame, and gives the toggle a 4px track with a 2px knob: concentric, R − d, so the knob sits in its track the way a card sits in its frame (Border I §III). Neutral is the reference scale, sm on the box and full on the toggle. Friendly can't round a 16px box past 4 without turning it into a radio, so it rounds what has room to carry it: the dot to 8 and the frame to lg, and on larger controls such as the selectable card (§XI) the corner rises to lg as well. The mixed row is what drift produces, a square box from one library beside a pill from another and a ring-and-fill radio from a third. None of the three is wrong alone. Together they say three different products.
| Parameter | Default here | Acceptable | Wrong |
|---|---|---|---|
| Box radius at 16 | 4 (sm) | 0 · 2 | Full: it becomes a radio |
| Checked mark | Check, stroke 2 | Solid fill with no glyph, at 16 and above | × reads as remove; the dash is reserved for mixed |
| Radio's inner mark | Dot 6 at 16 | A larger dot (8) · ring and fill | A square inside the circle: fails at 1× |
| Track · knob radius | Full · full | 4 · 2, the sharp system | 0: reads as a segmented control |
| Knob finish | Flat paper | A hairline ring · a drop shadow, a choice this series doesn't make | — |
The mark is a check by default, because a check means yes in every reading tradition the product is likely to meet. A solid fill with no glyph is a legitimate alternative at 16px and above, where a filled square is unmistakably different from an empty one; below that it reads as a dark speck. The dash is reserved for the mixed parent (§VII), and spending it on anything else leaves the mixed state nothing to look like. An × is wrong whatever the character: on screens it means remove, close, or delete, and a box full of them reads as a list of things being thrown away. The radio's dot may grow to 8 or become a ring around a filled dot; a square inside the circle is a novelty that reads as a rendering fault at 1×. The knob is flat paper by default, and a hairline ring is acceptable where the knob sits on a light track. A drop shadow on the knob is the 2010 skeuomorphism, a physical switch drawn on glass: this series doesn't use it, but it is a choice a product can make and hold, not a sin.
Every other specimen on this page is drawn at the neutral defaults; they are one answer, not the only one. Border I §II sets the radius steps, §X the character they add up to, and Part V, Editorial Style (planned), carries the general case: the series' stance on style is that it is chosen once and audited, not ranked.
The label is part of the target. Wrap the box and its text in one <label> and the whole row becomes clickable: 28px tall in a stacked group, 32px for a single control in a form, 44px on touch. A 16px box on its own is under the WCAG 2.2 minimum of 24 by 24, and a label that only sits next to the box isn't associated with it.
A box with nothing associated is a 16px target with a caption beside it. Pointer users aim at the word they're reading and miss; screen-reader users hear "checkbox, checked" with no name. The criterion has a spacing exception, under which a stack of 16px boxes 28px apart passes, but the exception doesn't make the box any easier to hit, and it is lost as soon as the rows tighten. Visual proximity is not association. A span of text 8px from a box looks like its label, and the browser has no idea.
for and id on the text fix the name and make the words clickable, but the target is still two islands: the 8px gap between box and text and the 4px above and below are dead, so a click that lands between them does nothing. Wrapping the row in the label makes one target the full width of the row and the full pitch tall, with no gaps between neighbours because the rows touch. It also needs no ids, which matters in lists rendered from data, where duplicated ids are a common source of a label toggling the wrong box.
Keep the native input. Hide it visually, draw the box as its next sibling, and style the box from the input's state with :checked + .box, :focus-visible + .box, and :disabled + .box. The input still submits with the form, still takes Space, still reports its state, and still gets its name from the label. A div with role="checkbox" has to rebuild every one of those by hand, and usually some get missed. A toggle is the same input with role="switch" added, which is what the WAI-ARIA switch pattern describes: a binary input whose values are on and off.
Touch raises the floor, not the box. On a touch posture the row grows to 44px, which is Apple's minimum control size on iOS; the box stays at its posture's size and the label's padding takes the difference. A bigger box doesn't make a bigger target. A taller label does.
The label names the state that is true when the control is on, written as a positive statement: "Email me a weekly digest", never "Enable weekly digest" and never "Don't email me". A toggle needs no On/Off text if its label reads. Helper text goes below the label in the helper voice, and its left edge sits on the label's left edge, not the box's.
A verb names an action, and a checkbox holds a state. "Enable weekly digest" reads correctly only while the box is unchecked: once it's checked, the screen shows a command that has already been carried out. "Email me a weekly digest" is true when checked and false when unchecked, so the label and the box agree in both states. A negative label makes the user work out a double negative ("Don't hide…", unchecked) before every change, and checking a box to turn something off is the opposite of what checking means everywhere else in the product. A toggle with "Turn on" in its label, "Off" beside it, and OFF inside the track states its condition three times and still confuses: the label offers an action while the status reports a state. Nielsen Norman Group's toggle guidelines make the same point about keeping labels short and unambiguous. When a toggle needs words beside it, which is rare in a settings list and common where the setting is a mode with a name, the words are a status in the muted ink ("Paused", "Live"), never a verb.
Helper text belongs to the label, so it aligns to the label. It sits at text-sm in the muted ink (Type III §III), directly under the label's first character, indented by the box plus its gap, 24px at default. Under the box, the helper reads as a separate row of text that belongs to nothing; the box's column should hold only boxes, so the eye can run down it. It sits outside the <label> and is linked with aria-describedby, so the control's name stays short and the helper is read as its description. GOV.UK's checkboxes set their item hints this way, indented under the label.
A group is a fieldset with a legend, set as the group-label voice: 11px uppercase at 400, +0.06em. Rows stack vertically by default at a 28px pitch, which leaves 8px between labels (12px when comfortable). Groups are 24px apart, so inner gaps stay smaller than outer ones. Options go side by side only for two or three short radios, and then 24px apart, three times the gap between a box and its label.
Horizontal options with equal gaps fail the proximity rule: each circle sits 8px from the label before it and 8px from the label after it, so it belongs to both. When the row wraps, the last option starts a second line on its own and the set no longer reads as one question. Stack it. A row of options is allowed only when it fits on one line at the narrowest width the form supports, which in practice means two or three short labels; GOV.UK limits inline radios to two short options and stacks them on small screens. Even then, the gap between options is three times the gap between a control and its label, so each pair reads as a unit.
One legend asks one question. A group that mixes radios and checkboxes asks two, and interleaving them hides which answers exclude each other. Split it into two fieldsets, each with its own legend. Centered rows have no rail: each box sits wherever its label's length puts it, and the eye can't run down the column of boxes to see what's checked. Groups are left-aligned, boxes on one x, labels on another 24px further in (Grid II §III).
The legend takes the group-label voice, 11px uppercase at 400, the same voice Type III §II gives group labels everywhere. When the group is a whole form section and nothing else on screen marks it, the legend can be the section's one emphasis at the UI voice and 600. The vertical rhythm follows the nesting rule: 8px between rows inside a group, 8px from legend to first row, 24px between groups. Use a radio group's legend for the question and its labels for the answers, so a screen reader announces "Format, group" before each option and the options can be short.
The mixed state, drawn as a dash, belongs only to a parent checkbox that summarizes children, and it means "some of these". It is a display state computed from the children, never a value the user sets or the form submits. Clicking a mixed parent checks every child; clicking again clears them.
Mixed is the parent reporting on its children. The WAI-ARIA checkbox pattern defines it this way: a tri-state checkbox shows checked when all options are checked, partially checked when some are, and not checked when none are, and checking it checks them all. Carbon reserves the state for a checkbox that contains a sublist. A parent that shows an empty box while a child is checked is lying about the selection, and it is the most common bug in nested checkboxes, because HTML can't express the state in markup. It is a property set in script, input.indeterminate = true, and code that renders from data forgets to set it.
From mixed, a click selects all. The dash says the selection is incomplete, so completing it is the expected next step, and it is what the browser does by default when the parent's checked is false under the dash. Some products remember the partial selection and restore it on a third click; the pattern permits that, but it makes the parent a three-way cycle that users have to learn, and a plain all-or-none is easier to predict. A single checkbox never shows a dash to mean "maybe" or "not applicable"; a third answer needs a radio group with three labelled options.
Indent children by the box plus its gap, 24px, so each child's box sits on the parent's label edge and the tree reads as an outline. The parent carries the count ("2 of 3") at the row's trailing end when the children can scroll out of view. The same parent heads a table as its select-all checkbox (§XI), and a listbox as its select-all row, where Select II §IV settles what "all" means while a filter is active.
In a settings list the toggle trails: its label leads, and the toggle sits on the row's trailing edge, every toggle on one rail. The knob moves and the track changes tone, nothing else, in Motion's fast step on the move curve. A toggle is reversible by toggling it back, so it never triggers a confirmation; an action that needs one is a button.
The checkbox leads and the toggle trails, because they say different things. A checkbox is part of a sentence: "☑ Email me a weekly digest" reads left to right as one statement, so the mark comes first, the way a bullet does. A toggle is a status at the end of a row: "Low-stock alerts … on" is a label and a value, laid out like the property rows of Grid II §VII, and the value goes at the trailing end. Apple's guidance is to use the switch style only in a list row, where the row's content gives it context. Trailing toggles share one rail, the frame's inset, so the column of states can be scanned in one pass. Toggles placed right after their labels sit wherever the label ends, and in the specimen their right edges spread across 49px.
A toggle must be undone by toggling it back. That is its whole contract: the change is immediate, so it has to be cheap and reversible. Carbon recommends toggles for actions reversible without additional confirmation and rules them out where an action needs confirmation, such as deleting a file. A toggle that opens a confirmation has already moved, so the user is asked about a change the screen is showing as done, and if they cancel, the knob has to jump back. Anything that deletes, sends, or publishes is a button in its own position with its own confirmation, following the rule that irreversible actions stand apart; a setting that merely enables such an action later is a toggle only if turning it off undoes it completely.
No text inside the track. At 18px tall there's room for 9px text, which is below the series' 11px floor (Type III §VII), and the word has to be swapped, mirrored, and translated. "OFF" and "AUS" don't fit the same track. The knob's position and the track's tone already carry the state.
The knob travels in --duration-fast (150ms) on --ease-move, and the track's tone changes over the same 150ms, linear. Motion I §II assigns the switch knob to the fast step: it is a small control the user operates directly, so anything longer than 150ms makes it feel slow to respond. Under reduced motion the knob jumps to its end position in 0ms. The position is the state, so it still has to change, and the reduced-motion contract removes the travel, not the change.
A toggle flips the instant it is pressed, and the request follows. The row is the only place the result may be reported. If the request fails, the toggle itself goes back, in motion, with the reason beside it; if it is slow, the row says so after a second, and not before.
The toggle promised to apply at once (§I), and a network can't keep that promise, so the interface keeps it and the server catches up. The general design of latency, skeletons and progress belongs to Loading & Skeleton States (planned). This section settles the one case the toggle forces: what a control that has already moved does when the change behind it is slow, raced, or refused.
| Moment | When | Token · voice |
|---|---|---|
| Press: the knob moves | 0 → 150ms | --duration-fast · --ease-move; the track's tone over the same 150ms, linear |
| Most answers arrive | under 1000ms | Nothing else appears; the flip was the feedback |
| Pending | from 1000ms | "Saving…" under the label, text-sm 12/16 at the muted ink; appears in --duration-instant |
| Failure: the knob returns | on the answer | --duration-fast · --ease-move, the same move as a press; 0ms travel under reduced motion |
| The reason | with the return | The UI voice, 13/20 at the ink, with the icon; "Try again" underlined at 400 |
| Success clears "Saving…" | on the answer | --duration-instant; no "Saved" for a change the user is already looking at |
For the first 1000ms the flip is the feedback. Most requests finish inside it, and an indicator that appears for 300ms and vanishes is a flicker the user reads as a fault. After a second, the row says "Saving…" under the label in the helper voice at the muted ink, because it leaves the control's silhouette alone: the toggle goes on showing the state the user asked for. A small indeterminate ring inside the knob is acceptable, as long as the knob keeps its position and its size. Two things never are. A spinner that replaces the knob removes the state at the moment the user is checking it. A disabled look during flight tells the user they have done something wrong, when they have done exactly what the control asked. The only motion is the press and, if it comes to it, the return, both --duration-fast on --ease-move (Motion I §II, §IV); text that reports a state appears in --duration-instant.
Allowed, and the last press wins. Each press sends the state the toggle now shows, and a response to an earlier press is ignored if it disagrees with the row. That only works when the API sets a value rather than flips one: two "toggle" requests in flight land in either order and leave the setting wherever the race ends, while two "set enabled to false" requests leave it at the last one. Locking the control until the request returns is acceptable for an operation the server can't coalesce, such as one that starts a job each time; then the lock wears the pending look, never the disabled one.
The toggle returns to its true state with the same move a press makes, 150ms on the move curve, so the user sees the knob travel back and knows the setting is where it was. Under reduced motion the return still happens, with no travel: the position is the state. A change the user didn't cause is exactly the kind Motion I §VII says to show. The reason appears in the row at the UI voice, 13px, because an error is never smaller than the text it corrects (Type III §VI): a short cause and, if the action can be retried, "Try again" as an underlined link inside the line, at 400. It isn't drawn as a button, which would compete with the toggle for the row's trailing rail and read as a second control. The reason's left edge sits on the label's left edge, the same edge every helper takes (§V), measured here at 0, so it reads as part of the row it belongs to. It stays until the next successful change.
The corner toast is the worst of the four: the toggle still says on, so the control lies, and the only true thing on the screen is 800px away, gone in five seconds, and too vague to act on. The silent snap-back tells the truth about the state but not the cause, and a user who sees their setting undo itself presses again, and again. The modal stops everything to report a change the user can make again with one click. Pending for ever is a request nobody timed out: after tens of seconds it has failed, and the row should say so and put the toggle back.
A toggle needs no undo affordance, because toggling back is the undo; that is exactly why a toggle never triggers anything that can't be taken back, such as notifying 1,240 people, deleting records, or deploying a build, which take a button and their own confirmation (Grid II §V, and §VIII here).
When the row is shown again and the server holds a different value from the one the user left, the control follows the server, in motion, and says nothing unless the user is looking at it as it changes. The worst failure is the opposite: a toggle that keeps showing the user's optimistic value after the server has refused or replaced it, so it differs silently from the truth every time anyone looks. The movement is what tells a user who is watching; a message about a change they never saw is noise.
Rest is the strong hairline; hover darkens the edge one step; focus adds the 2px ring at a 2px offset; checked fills with ink and draws the mark in paper; disabled drops the edge to the default hairline and the label to the faint ink. Error is for required consent only, shown by an ink edge and a message at the UI voice. None of these uses opacity or changes the box's size.
Hover is a tone step, not a new color. The unchecked edge goes from .52 to .72, the checked fill lightens one step, and the off track darkens one step, the same hover contract every outlined control follows (Border I §VIII). Focus is the ring, drawn with outline at a 2px offset, so it follows the box's 4px corner outward, goes round on the radio and the toggle, and moves nothing. It shows on keyboard focus only (:focus-visible), because a ring that appears on every click reads as a selection.
Disabled is reduced ink, never opacity. Fading the whole control with opacity lets the surface show through the fill, turns the mark grey on grey, and makes the knob of a disabled toggle look like it's floating. Instead each part steps to a named lighter value: the edge to the default hairline, the checked fill to a pale tone, and the label to the faint ink. Disabled controls are exempt from the 3:1 requirement, and the drop below it is how the user can tell a control is disabled. If the reason isn't obvious, put it in the helper text: "Available after the batch is logged."
Error belongs to consent, not to choices. An unchecked optional box is a valid answer, so it never shows an error. The one checkbox that can be in error is the one that must be checked to continue (an agreement, an acknowledgement), and it gets an ink edge plus a message at the UI voice, never smaller (Type III §VI). A required radio group with nothing chosen puts the message under the legend, not on each radio. In a chromatic system the edge and the icon take the danger color; here, ink and the icon carry it, and color is never the only signal.
Inside a table the box leads in its own 32px column, centered on the row; the header holds the select-all parent. Inside a menu the state is a check mark in a reserved gutter, not a box. A selectable card makes the whole card the label, shows its control at the leading top, and marks selection with the 2px edge.
| Accession | Site | Lots | |
|---|---|---|---|
| AC-2291 | North vault | 14 | |
| AC-2304 | Cold room 2 | 3 | |
| AC-2318 | Field station | 27 | |
| AC-2340 | South vault | 8 |
In a table, the box gets its own column. A 32px leading column holds the box centered, 8px either side, so every box sits on one x and the header's select-all sits directly above them. The box is centered on the row, not offset onto a text line, because a table row is one line tall and the row, not the text, is what's being selected. A selected row takes the tint as well as the check, so the selection can be seen from across the table. The header box is the mixed parent of §VII, and it selects what's loaded or filtered, not everything in the database. That question, and the column widths around it, belong to Grid III §II.
In a menu, a check, not a box. A menu closes on activation, so its checkable items are commands that also show a state: "Grid lines ✓". The check goes in a 16px gutter that every item reserves, so labels stay aligned whether checked or not, which is the leading-check pattern of Select I §VI. Boxes in a menu make it look like a form that's waiting to be submitted. The exception is the multi-select listbox, which stays open while a set is built up, and there boxes are right (Select II §III).
In a card, the card is the label. The whole surface is the target, the radio or checkbox stays visible at the leading top so the card says whether it is one-of or any-of, and selection adds a 1px inset ring inside the 1px border: a 2px edge that moves nothing (Border I §V). shadcn/ui documents the same construction, with a label wrapping the whole field for a clickable card. Focus goes on the card, as the ring around its 8px corner. Cards are the right control when each option needs a sentence of description to be compared, which is the exception to §I's five-option rule.
A settings list is a column of toggles that apply as they move, with no Save button. A form is a set of checkboxes and radios that wait, with Cancel and Save at its foot. A screen is one or the other, and a section never mixes the two commit models.
Toggles above a Save button give the user two contradictory signals. The knob says the setting is on; the button says it isn't yet. Users who leave the page without saving find their settings unchanged, and the ones who learn to press Save every time stop trusting toggles anywhere else in the product. Either the list applies as it moves, or it's a form of checkboxes. A settings list that applies at once says so once, in the helper voice at its foot or head, and confirms each change quietly (a check, a transient "Saved"), never with a dialog.
A form commits once, at its foot. Its checkboxes and radios change nothing until the primary button is pressed, so Cancel can discard every change at once. The two buttons are a routine pair, Cancel and the form's verb, side by side. If the form's real action is irreversible (sending to a client, releasing a batch), that action doesn't sit beside a routine Save at all: it gets its own position and its own confirmation (Grid II §V). A page can hold both, a settings list in one section and a form in another, as long as each section is entirely one model and the boundary between them is visible: a section heading or a separate card, never a toggle in the middle of a form.
An unchecked box's edge is the only thing that shows it's there, so it needs 3:1 against the surface. Controls use the strong hairline, .52 alpha, which measures 3.17:1 on the paper canvas, and containers keep the default .14. The lazy default, the light #d4d2cc separator used as a control border, measures 1.45:1 and fails. In dark mode the strong edge is white at .40, 3.83:1.
This contradicts the lazy default on purpose. Most systems define one border color for everything, pick it to look right around cards, and then use it for inputs and checkboxes too. Around a card, 1.3:1 is right, because a card isn't a control and its edge is decoration. Around a checkbox the edge is the control: WCAG 2.2 §1.4.11 requires 3:1 for the visual information needed to identify a component and its state. Border I §V already split the tokens, --border-default for containers and --border-strong for controls. This chapter is where the split matters most, because a checkbox has no fill, no text inside, and no shadow, only its edge.
The toggle's off track and the checked fill count too. The off track is a solid tone at the strong edge's value, #928f8a, 3.08:1 on the canvas, with a white knob at 3.22:1 against it. The checked fill is ink, 16.65:1 on the canvas, so checked and unchecked can't be confused. Dark mode keeps the structure and rechooses the values, on Elevation's ramp (Elevation I §VI): the edge is white at .40, the checked fill is the light ink #ecebe8 with the mark in the dark canvas #121212, and the off track is #767676. All three are opaque or edge-only, with no translucent fills and no glow (Elevation II §II).
| Token | Light | Dark | Measured |
|---|---|---|---|
| control edge | rgb(46 40 30 / .52) | rgb(255 255 255 / .40) | 3.17 : 1 on #fafaf8 · 3.22 on #fff · 3.83 on #1a1a1a |
| control edge, hover | / .72 | / .60 | 5.72 : 1 on #fafaf8 |
| disabled edge | / .14 | / .14 | 1.30 : 1, below 3:1 by design |
| checked fill · mark | #1a1a1a · #fafaf8 | #ecebe8 · #121212 | 16.65 : 1 · 15.71 : 1 |
| toggle track off · knob | #928f8a · #fff | #767676 · #ecebe8 | 3.08 on #fafaf8 · 3.22 on #fff; knob 3.22 on track |
| focus ring | 2px ink, offset 2 | 2px light ink, offset 2 | 16.65 : 1 · 14.60 : 1 |
Selection controls are small enough that teams build them in an afternoon and get them wrong for years. In order, the decisions to write down once for a product:
The toggle in a form. A switch that waits for Save, so the screen shows the setting changed while the system knows it hasn't.
The orphaned box. A checkbox whose text is a sibling span, so the target is 16px and the screen reader reads no name.
The baseline box. A control dropped inline on the text's baseline, riding 4px high, or centered on a two-line label and sinking.
"Enable…" and "Don't…". Labels that name an action or a negation, so the user has to work out what checked means.
The lying parent. A select-all that shows an empty box while some children are checked, because nobody set indeterminate.
The borrowed shape. A round checkbox or a square radio, so the control promises the other one's behaviour.
The drifted set. A square box, a pill toggle and a ring-and-fill radio on one row, each from a different library.
The confirming toggle. A switch that asks "Are you sure?" after it has already moved.
The lying toggle. A switch that stays on after its request failed, while a toast in the far corner says something went wrong.
The faded disabled state. Opacity on the whole control, so the mark turns grey on grey and the surface shows through.
The card-colored border. A control drawn in the container's hairline at 1.3:1, invisible on a bright screen.
Segmented controls and filter chips are radio groups and checkboxes in other clothes, and they are left for Part II, along with validation across a whole group and selection in long lists.
Part I of Checkbox, Radio & Toggle.
A checkbox waits, a radio chooses, a toggle acts. The label is the target, and the edge is the control.