Dustin Johnson ← Design Primitives
Design Primitive Reference · Part I · October 2026

Border & Radius

The hairline and the corner. A radius scale of five steps decided once, the rule that keeps nested corners concentric, and a border system in which one pixel means edge and two means focus.

I. Why the Corner Is a Primitive

The corner is the most legible carrier of a product's character, and it is read before a word of the interface is. That makes radius a system decision, made once: a product whose corners are chosen per component reads as several products wearing one logo.

Start with the failure, because it is the ordinary one. Here is the new-acquisitions screen of an invented branch library's catalogue: a top bar with a search field, a header with two actions, filter chips, three cards, and a patron panel docked on the right. Nothing on it is ugly on its own. Every corner and every edge was chosen by someone with a reason: the search "felt friendlier" rounder, the featured card "needed to stand out," the panel "looked boxy." Look at it before turning the inventory on.

Eastwick LibraryCatalogueLoansPatronsSearch titles, authors…r 12 on 26JA
Catalogue / AcquisitionsNew this month
Export list2Add item6
All2410 on 22On shelf17On loan7
12 inside 8
Field Notes on Tidal FlatsM. Ellery · 2019
On shelfReserve
8
The Salt Road AtlasD. Varga · 2022
On loan6 on 18Reservefull
0
0 inside 8
A Short History of BellsI. Okon · 2021
On shelfReserve6
2px edge
7 radii besides 0 and full · 2 border weights · 1 inner corner rounder than its card · 1 docked panel rounded · 2 doubled rules As found · Every corner chosen for a local reason · Wrong The search field and the filter chips are almost pills and not quite. The first cover is rounder than the card holding it; the third is square inside a rounded card. The panel is rounded where it meets the edge of the screen.

Three things are wrong, and none of them is any single radius. There is no scale. Seven different radii sit on one screen, several of them on siblings: the two header buttons are 2 and 6, the three Reserve buttons are 4, full, and 6. Nesting is broken. The first card's cover is rounder than the card around it, and the third card's square cover pinches against its rounded corner; neither is concentric with its container (section III). The edges disagree. One card has a 2px border because it was "featured," the patron panel wears a border, a fill, and a shadow at once, and the loans list draws a rule wherever two edges meet, so it has two. Section XI audits this screen and fixes it with four values.

Radius deserves its own chapter because the eye reads shape before it reads anything else, and it reads corners as personality. Sharp corners read as precise, technical, editorial; moderate radii read as neutral and contemporary; large radii read as friendly; the pill reads as consumer and informal. Button Taxonomy §I traced that to the Bouba/Kiki effect and mapped the range for buttons. What a button chapter can't say is that the reading is cumulative: every corner on the screen votes, and a screen whose corners vote for three characters reads as no character at all. Users can't name what's wrong with it. They say it feels unfinished.

FilterExportShare
SortColumns
Five radii on siblings · Wrong

2, 4, 6, 9, 12 on one toolbar. Each was somebody's default.

Inner rounder than outer · Wrong

A 16px image inside a 6px card. The child looks pasted on from another product.

Reserve
Pill in a square card · Wrong

Two characters in one component: a consumer button in an editorial box.

The boundary with neighbouring chapters, stated once. Button Taxonomy I owns the button's radius options (sharp, subtle, moderate, round, pill) and the outlined button's border weight; this chapter owns the system-wide scale those options are drawn from and the nesting rule they obey. Text Inputs I §III owns the field's inheritance of the button's radius; this chapter owns the ring around it. Elevation & Depth owns the shadow and what height means; this chapter owns the hairline and the corner. Spacing & Density owns the insets that the nesting rule here subtracts.

Every corner on a screen votes for a character. Count the votes before arguing about any one of them.

II. The Radius Scale

Use five steps, none, sm, md, lg, full, set at 0, 4, 8, 12, and 9999px, and assign each to a class of element rather than to a component: controls take sm, containers take md, overlays take lg, shapes take full, and anything docked to the frame takes none. Choosing a class for a new component is then the only radius decision anyone makes.

0
none · 0
Docked regions
4
sm · 4px
Controls
8
md · 8px
Containers
12
lg · 12px
Overlays
∞
full · 9999px
Shapes
The reference scale · Four steps a base unit apart, then a change of shape The first four steps differ by exactly one base unit. The fifth isn't a bigger radius; it is a different shape, the one that ends in a semicircle whatever the height.
StepClassTakes itNever
none · 0DockedTop bar, sidebar, inspector, the docked edges of a drawer or sheet, full-bleed media, table cells, banners that span the frame.Anything that floats free of the frame's edge.
sm · 4ControlsButtons, inputs, select triggers, checkboxes, menu items, tooltips, segmented items, thumbnails inset one base unit in a card.Containers; a 4px card reads as a large button.
md · 8ContainersCards, panels, table frames, menus, popovers, listboxes, toasts, wells, the frame of an image grid.Controls inside a dense toolbar; 8 on a 28px button is already soft.
lg · 12OverlaysDialogs, the free corners of a sheet, a command palette, onboarding panels.Anything at level 0; a 12px card says "dialog."
full · 9999ShapesAvatars, status dots, switch tracks and knobs, chips and tags, and pill buttons in a system whose character is pill.A rectangle with a fixed "pill" radius in px (section IV).

Why One Base Unit Apart

The spacing scale is a hybrid, linear at the bottom and widening above (Spacing I §III). The radius scale is linear for its first four steps and then stops, for a reason specific to corners: a child inset by one base unit from its container's edge takes the step below. A menu at md 8 holds items inset 4px, so the items are sm 4. A card at md 8 holds a cover inset 4px, so the cover is sm 4. A dialog at lg 12 holds a preview inset 4px, so the preview is md 8. Every one of those pairs is concentric (section III) without anyone computing anything, because the scale is closed under the most common nesting in the interface. A geometric scale (2, 4, 8, 16) loses that property at every step above the first.

It stops at 12 because above it product surfaces stop reading as neutral. A 16px card is a friendly product's card, and a 24px card belongs to a consumer app; those are legitimate characters (section X), but they are choices of a different scale, not more steps on this one. And it jumps to full because the pill is not a large radius. It is a shape defined by the element's height, and it has to stay a semicircle when a chip grows by a line of text or a button changes size.

Steps You Can Tell Apart

Two radii belong to one step when the eye can't tell them apart at the size they're used. The rule that falls out of that is steps at least one base unit apart, never half-steps, and a scale short enough that every step has a class to serve.

RenewRenew
6 vs 8 on a 34px button · One step, not two · Avoid
10 vs 12 on a card · Indistinguishable · Avoid
Renew
4 on the control, 8 on the container · Two classes · Right
If two values look the same on the element that uses them, half the team will pick one and half the other, and the screen drifts back to section I.

The systems that have published a scale agree on the shape. Material 3 launched its shape scale with seven steps (none, extra-small 4dp, small 8, medium 12, large 16, extra-large 28, full) because it serves products of every character; a single product uses three or four of them. shadcn/ui goes the other way and derives its whole set from one --radius variable, with the smaller steps computed by subtracting a few pixels, which is the right instinct: one decision, and the rest follows. Carbon is the sharp system, drawing nearly every control and container square and rounding little beyond its tags and toggles. Apple's HIG asks for concentric corners when shapes nest, which is section III. Linear keeps its radii small and few, and the restraint is a large part of why the product reads as a precise tool.

/* The scale. Steps are the only radius values in the codebase. */ :root { --radius-none: 0; --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-full: 9999px; /* Roles. Components consume a role, never a step. */ --radius-control: var(--radius-sm); --radius-container: var(--radius-md); --radius-overlay: var(--radius-lg); --radius-shape: var(--radius-full); } .button, .input, .menu-item { border-radius: var(--radius-control); } .card, .menu, .popover { border-radius: var(--radius-container); } .dialog { border-radius: var(--radius-overlay); }

The role layer is the point. A product that changes character (section X) changes four role assignments, not four hundred components; and a reviewer who sees border-radius: 6px anywhere outside the token file has found a defect without needing to look at the screen.

A radius scale has as many steps as the product has classes of element, and no more. Five is enough because there are five: docked, control, container, overlay, shape.

III. The Nesting Rule for Corners

When one rounded shape sits close inside another, the inner radius is the outer radius minus the inset between them: r = R − d. Then both arcs share a center, the band between the shapes is the same width all the way round, and the pair reads as one object. Call this concentric corners. An inner corner is never rounder than the corner around it.

Each frame below has the same container (R 24px, exaggerated so the geometry reads at a glance) and the same 8px inset; only the inner radius changes. The dashed circles are the two arcs, the dots their centers, and the short black line measures the band on the diagonal, where the eye checks it.

R 24 · d 8 · r 32
corner 14.6 · side 8
r 32 > R · Rounder inside · Wrong
R 24 · d 8 · r 24
corner 11.3 · side 8
r = R · Thick corner · Wrong
R 24 · d 8 · r 0
corner 1.4 · side 8
r 0 · Pinched corner · Wrong
R 24 · d 8 · r 16
corner 8.0 · side 8
r = R − d = 16 · One center · Right
Band on the diagonal, from the outer arc to the inner shape · concentric is the only case where it equals the band on the sides Turn the guides off and judge the plain shapes: the first two look heavy at the corners, the third looks tight, the fourth looks like one object.

The geometry explains the feeling. With equal radii the inner arc's center sits d further in on both axes, so on the diagonal the band is d × √2, 41% thicker than on the sides; the corners look padded. A larger inner radius makes it thicker still, and makes the child look rounder than the thing holding it, which reads as a part from another kit. A square child in a rounded container is the opposite: its corner reaches toward the outer curve, and the band pinches to almost nothing. Only R − d gives a constant band, because only then do the arcs share a center.

When the Inset Is Large

The formula is for children that hug their container. When the inset is at least the outer radius, R − d is zero or negative, and the corners are far enough apart that the eye no longer reads them as a pair. Then the child takes its own class step from the scale, with one constraint that never lapses: it is no rounder than its container. A button 12px inside an 8px card is a control, so it is sm 4; a field 24px inside a 12px dialog is sm 4. The scale's ordering (control under container under overlay) satisfies the constraint automatically, which is the second reason classes beat per-component choices.

Anatomy · A catalogue card drawn at 2× · Tags in CSS px The cover hugs the card, so it is concentric with it. The button sits farther in than the card's radius, so it takes the control step, which is smaller than the card's. The chip is a shape and is exempt from both rules.

Full is a shape, not a size, and shapes are exempt. An avatar, a status dot, a switch knob, or a chip declared a pill is round wherever it sits, the same way a circle drawn on a square sheet doesn't violate anything. The rule is about rounded rectangles: a rectangle rounder than its container is the failure, and the pill button in a square card from section I is the most visible version of it. Its fault isn't geometry. It is two characters in one component, and section X takes it up.

Measure the inset from the container's outer edge, border included. A card with a 1px border and 3px of padding holds its cover 4px from the edge, and the cover is concentric at R − 4. That keeps the arithmetic in whole steps; measuring from inside the border gives r = 7 and an off-scale value nobody can name.

/* A container publishes its radius and its inset; a hugging child derives its corner. */ .card { --r: var(--radius-container); /* 8 */ --inset: 4px; /* measured from the outer edge */ border-radius: var(--r); padding: calc(var(--inset) - 1px); /* minus the 1px border */ } .card > .cover { border-radius: max(0px, calc(var(--r) - var(--inset))); /* 4: concentric */ } /* Children farther in than --r take their own class step, which is always ≤ --r. */ .card .button { border-radius: var(--radius-control); }

The same expression drives every hugging pair in the system: menu and item, segmented tray and selected segment, dialog and inset preview, card and cover. Because the scale's steps are one base unit apart and the hugging inset is usually one base unit, the result always lands on a step. When it doesn't, that is the signal that either the inset or the radius is off-scale.

A nested corner is either a pair or a stranger. If it hugs, it shares the center: r = R − d. If it doesn't, it takes its own step, and it is never the rounder of the two.

IV. Radius & Size

Radius follows the element's class, and the classes are already ordered by size, so larger things get larger radii without anyone computing one; within a class the radius holds across every size of the element, and it never changes with density. The one size check worth making is the ratio of radius to height: keep at least a third of the side straight, or go to full.

Large print24px · r 4 · r/h .17 · Right
Large print24px · r 10 · r/h .42 · Wrong
Large print24px · full · r/h .50 · Right
Renew36px · r 4 · r/h .11 · Right
Renew36px · r 16 · r/h .44 · Wrong
Renew36px · full · r/h .50 · Right
Radius ÷ height · above about .33 the straight side is nearly gone and the shape reads as a pill that didn't finish

The middle column is the most common radius bug in product UI, and it comes from writing a pill as a number. Someone sets a chip to border-radius: 10px because the chip is 20px tall; then it gets a larger font, or a second line, or is reused at 24px, and it is no longer a pill and not yet a rounded rectangle. Write a pill as 9999px, which the browser clamps to half the shorter side at any size, and write everything else from the scale. The uncanny zone, roughly a third to a half of the height, is never a destination.

The ratio is also why one control step can serve every control size. At sm 4, a 24px compact button sits at .17 and a 40px large one at .10: the larger looks a little crisper, which is what larger buttons should look like, and neither is near the zone. A product with friendly 8px controls should check its smallest control: 8 on a 24px chip is .33, the edge. The fix there is to make small controls pills, not to invent a 6.

Density Never Changes Radius

Spacing I §VII decides the density posture once for the system, and it moves insets, control heights, and row heights together. Radius isn't on that list, by design. Radius encodes character, and character doesn't change with how much fits on the screen. A team that scales radius with posture ships a compact mode that looks like a technical tool and a comfortable mode that looks like a consumer app, and users switching between them think they changed products.

Radius held at sm 4 · Right
CompactCall numberFind
DefaultCall numberFind
ComfyCall numberFind
Radius scaled with posture · Wrong
CompactCall numberFind
DefaultCall numberFind
ComfyCall numberFind
Held: 4 / 4 / 4 · ratio .14 → .09 · Scaled: 2 / 6 / 14 · three products

Docked Regions Have No Corners

An element that touches the frame's edge has no corner to round. The top bar, the sidebar, an inspector, a drawer's docked side, a full-bleed banner: each is a region of the frame (Grid I §II), not an object on it, and rounding it opens a notch of canvas where it meets the window. Their radius is none. Corners belong to things that float free of the frame: the cards in the main region, the drawer's two free corners, the dialog.

Docked sidebar at r 12 · Notches at the frame · Wrong
Docked square, cards at md 8 · Right

Pills carry one more size rule, because their ends eat into the space for text. A pill's straight run begins half its height in from each end, so its inline padding should be at least four-tenths of its height: 13px on a 32px pill button, 8px on a 20px chip. Less and the first and last letters crowd the curve. The rest of a pill's proportion is Button Taxonomy's to decide.

Radius belongs to the class, not the size and not the density. Check the ratio once, at the smallest size, and write pills as pills.

V. The Hairline

Draw every border in the system at 1px, in a tinted dark at low alpha, and reserve 2px for exactly two states: focus and selection. One weight means "edge," the other means "this one, now," and the meaning survives only if nothing else is drawn at 2px.

0.5px · Device-dependent · Avoid
1px · The hairline · Right
2px at rest · Reads as selected · Wrong
3px · Graphic, not an edge · Avoid
Same color in all four. Only the weight changes, and from 2px up the card stops being bounded and starts being outlined.

Half-pixel borders are drawn as one device pixel on a 2× display and rounded up to a full CSS pixel on a 1× display, so the same token produces two different weights depending on the screen the reviewer happened to use. Text Inputs §IV notes that they need a darker color to stay visible, which is the tell: a 0.5px border at a usable color is a 1px border at a lighter one, with worse behaviour. Weights above 1px at rest stop describing an edge and start drawing an outline, the graphic style of brutalist and playful systems. That's a character choice, and the Button chapter's §IV describes it; in a neutral product it's what section I's "featured" card did by accident.

Alpha, Not Gray

Write the hairline as the paper's dark at low alpha, rgb(46 40 30 / .14), rather than as a solid light gray. A solid gray is a fixed color, so its contrast depends on what it lands on: on white it is a hairline, on a tinted sidebar it is barely there, and on a darker surface it becomes a pale halo. An alpha border darkens whatever is beneath it by the same proportion, so it holds its contrast on every surface. It is the same tint Elevation uses for shadow (Elevation I §III), for the same reason.

solid
1.32 : 1
alpha .14
1.31 : 1
On white · Both fine
solid
1.21 : 1
alpha .14
1.31 : 1
On the canvas · Solid fades
solid
1.04 : 1
alpha .14
1.29 : 1
On a toned region · Solid vanishes · Wrong · Alpha holds · Right
Contrast of the border against the surface it sits on · solid #e2e0da vs rgb(46 40 30 / .14)

The ratio stays at 1.3 whether the card sits on white, on the warm canvas, or on a toned sidebar; the solid gray falls from 1.32 to 1.04. In dark mode the same idea inverts: borders are white at low alpha, which brightens whatever is under them, and the inverse token below is that value.

The Border Tokens

--border-subtle.10 alpha · 1.2 : 1Dividers between rows; the edge on a raised surface (Elevation's --edge).
--border-default.14 alpha · 1.3 : 1Cards, panels, frame regions, table frames. The hairline.
--border-strong.52 alpha · 3.2 : 1The edge of a control: inputs, outlined buttons, checkboxes. Hover: .72.
--border-inversewhite · .14 alphaHairlines on dark surfaces and in dark mode.
Four colors, one weight · Contrast against white

Strong is not a stylistic step; it is a legal one. WCAG 2.2 §1.4.11 requires 3:1 against the adjacent color for the visual boundary needed to identify a control, so an input whose only boundary is its border can't wear the 1.3:1 hairline a card wears. At .52 alpha the control edge reaches 3.2:1 on white and 3.0:1 on the toned region. Cards are exempt, because a card isn't a control; a checkbox, a text field, and an outlined button with no fill are.

Two Pixels, Drawn Without Moving Anything

Focus and selection are the 2px states, and both must be drawn without changing the element's box. A border that grows from 1 to 2px moves the content by a pixel and shifts every sibling after it. Selection adds an inset ring inside the 1px border; focus draws a ring outside it (section VIII).

Week7 days
Fortnight14 days
Selected by a 2px border · Text moves 1px · Wrong
Week7 days
Fortnight14 days
1px border + 1px inset ring · Nothing moves · Right
The dashed line is each tile's text edge at rest. On the left, the selected tile's text sits a pixel inside it.
One pixel means edge. Two means this one, now. Anything else at two pixels spends the only weight that says "selected."

VI. Border vs Fill vs Shadow

Bound a surface with one thing: a border if it is an object on the page, a fill if it is a region with a different role, and nothing at all if it is only a group of content, which is the default. Shadow is not one of the options for a surface on the page. It belongs to surfaces above the page, and Elevation I §II decides when that is true; this section decides everything below that line.

Border · An object · Right

A white card on the canvas, bounded by the 1px hairline. It can be picked, opened, or compared.

loan-policy-2026.pdfbranch-hours.pdfdonations.csv
Fill · A region · Right

A sunken well holding attachments. The tone says "a different place"; the objects inside carry the borders.

Opening hours
Holds policy
Nothing · A group · Right

Two sections of a settings page. A heading and a gap from the spacing scale do the bounding.

White on white, no edge · Wrong

A card with a radius and no boundary. The corners are invisible, so the radius says nothing.

Border + fill + shadow · Wrong

Three cues on a flat card, each added because the others "weren't enough." It claims to float and doesn't.

Box in a box in a box · Wrong

Every group bordered. Three edges and three insets to reach one line of content.

The choice comes from what the surface is, not from how much separation it seems to need. An object, something the user can pick, open, drag, or compare with its neighbours, gets a border, because an object has an edge. Cards, table frames, a panel holding a form, a tile in a picker. A region, a part of the screen with a different job, gets a fill one tonal step away from its surroundings and no border: a sidebar, a toolbar band, a well, a code block (Elevation calls the step below the page sunken). A group, a set of content that belongs together, gets nothing, and the spacing scale's gaps and a heading do the work (Spacing I §V). Most of a settings page, most of a detail screen, and every form section are groups.

It isBound it withRadiusExamples
An object1px · --border-defaultIts class stepCard, table frame, picker tile, attachment row, the panel around a form.
A regionFill · one tonal stepnone if docked, md if notSidebar, toolbar band, well, code block, an empty-state tray.
A groupNothing · a gap and a headingNone to drawForm sections, settings sections, the blocks of a detail screen.
Above the pageElevation's level · shadow + --border-subtlemd or lgMenu, popover, dialog, toast. Elevation I §IV.

Combining is allowed in one case only, and it is Elevation's: a surface above the page wears its shadow for height and a subtle hairline for a crisp edge, because a white menu over a white card has a soft boundary without one. Everything below the page wears one cue. Never border, fill, and shadow together, and never a border on a toned region: a sidebar a step darker than the canvas and outlined has spent two cues to say one thing, and the edge it draws competes with the cards inside it.

The white-on-white card is the reverse failure and the reason radius depends on this section. A corner is only visible where the surface has a boundary. A card with neither a border nor a fill contrast has a radius nobody can see, and teams discover it when someone adds a hover tint and the "square" card turns out to be rounded.

Object, region, group: a border, a fill, or nothing. Shadow is a fourth answer to a different question, and the page never asks it.

VII. Dividers & Rules

Divide repeated rows of equal weight that the eye has to track across, and let whitespace separate everything that has a heading. A divider is a hairline in --border-subtle, drawn between items and never after the last one, so that no edge on the screen is ever drawn twice.

Holds waiting2px
ABA. BrandtThe Salt Road Atlas2 d
CNC. NwosuNight Ferries3 d
LPL. PereiraLichens of the Fells5 d
2px
Rule under the heading · Every row closed · Wrong
Holds waiting
ABA. BrandtThe Salt Road Atlas2 d
CNC. NwosuNight Ferries3 d
LPL. PereiraLichens of the Fells5 d
inset 46 · text rail
Between rows only · Inset to the text · Right
Left: the heading's rule meets the box's top edge and the last row's rule meets its bottom edge, so both read as one heavy line. Right: two dividers for three rows, each starting where the names start.

Divide when the eye must track a row. A dense table, a menu with groups, a list whose rows carry several columns: each row is a line the reader follows across, and a hairline keeps them from merging. Don't divide what a heading already separates. Form sections, settings groups, cards in a grid, and the blocks of a detail screen are separated by the stack gaps of the spacing scale, and a rule under every heading adds a line without adding information. In section VI's terms, rows are slices of one object and need an edge between them; sections are groups and need none.

ContactEmail
NotificationsRemind me before a loan is due
Rules under headings and between sections · Wrong
ContactEmail
NotificationsRemind me before a loan is due
Headings and a stack gap · Right

Draw dividers between, never around. The usual implementation, a border-bottom on every row, puts a line under the last row that lands on the container's bottom edge and doubles it, and a heading with its own rule does the same at the top. Use the sibling combinator (.row + .row) or a gap with a background, so the container's edge is the only edge at its ends. The same applies wherever a bordered element meets a divider: a bordered table inside a section that already has a rule, or a toolbar with a bottom border sitting on a table with a top one. Where two edges meet, delete one.

Inset or full-bleed is an alignment decision, and Grid & Layout made it: a divider starts at the rail its row's text starts on (Grid II §X). In a list with leading avatars or icons, that rail is the text, so the divider is inset past the avatar and the avatars read as a column of their own; in a table, the first column's text is the rail and the dividers run the full width. The color is --border-subtle, one step lighter than the container's edge, so the frame reads as the object and the dividers as its interior.

A rule is an edge drawn inside an object. Draw it between rows, start it on the text, and never let it land on another edge.

VIII. Outlined Controls & the Focus Ring

On an outlined control the border is the control's edge, so its states change the edge's color and never its width: hover darkens it one step, error recolors it, and focus adds a 2px ring outside it, offset 2px, whose radius is the control's radius plus the offset. Drawn that way the ring is concentric with the control, nothing moves when focus arrives, and the 2px weight keeps its one meaning.

Call number
e.g. QH 541.5 .T5
Printed on the spine label. Call numbers start with a class letter.
Rest · 1px · --border-strong (.52, 3.2 : 1) · r 4 Hover · 1px · darkened one step to .72 · nothing else changes Focus · border to ink · outline 2px, offset 2px · ring radius 4 + 2 = 6 inside, 8 outside · box unchanged Error · 1px recolored (ink here; the danger color in a chromatic system) · message replaces the hint · box unchanged One field through four states · Loupe: the focused corner at 4×

Use outline with outline-offset for the ring. Current browsers draw an outline that follows border-radius, enlarging the radius by the offset, so the ring is concentric for free, the same r = R − d of section III run outward. An outline also takes no space, so focus moves nothing, and it survives forced-colors mode, where a box-shadow ring is removed. The offset is a strip of the surface color between the control's edge and the ring, which lets the ring read against any border color, including a dark error edge.

QH 541.5Ring r 4 on a field r 4 · Thick corners · Wrong
QH 541.5Square ring · Wrong
QH 541.5Border grows to 2px · Text moves 1px · Wrong
QH 541.5Outline 2 · offset 2 · r 4 → 8 · Right
The first two are rings drawn as separate boxes with their own radius, the usual result of a wrapper element or a design-tool component. The third is the 1px-to-2px focus border; the dashed line is where the text sat at rest.

The Family of Outlined Controls

Everything with a visible edge at rest follows the same contract: inputs, select triggers, outlined buttons, checkboxes, segmented controls, chips that can be toggled. Rest is --border-strong at 1px. Hover darkens that edge one step and changes nothing else; a hover that adds a fill to an input competes with the text the user is about to type. Focus is the ring, at the control's radius plus the offset, and a full control (a pill button, a chip) gets a pill ring, which the outline handles without a special case. Error recolors the 1px edge and adds a message; it never thickens the border, because a field that is both in error and focused must show both, and the ring is already the 2px element. Disabled lightens the edge to --border-default, below the 3:1 line, which is permitted for inactive controls and is how the user can tell.

Segmented controls and chip groups add one case: the group's outer edge is the object, and the selected item is a hugging child. The selected segment's radius is the tray's radius minus the tray's padding, which is section III again; a segmented control is the second most common place to find an inner corner rounder than its outer one, after the card cover.

The control's border is its edge; the ring is its focus. Change the edge's color, never its width, and let the ring follow the corner outward.

IX. Radius on Images, Media & Avatars

Media takes its corner from its container: flush media is clipped by the container, inset media is concentric with it, and only free-standing images take a class step of their own. Avatars are the exception that proves the rule: people are circles, things are rounded squares, everywhere.

Harbour at Low TidePhotograph · 1931
Flush, unclipped · Corners poke out · Wrong
Harbour at Low TidePhotograph · 1931
Flush · Card clips at R − 1 · Right
Harbour at Low TidePhotograph · 1931
Inset 4 · r 12 = 16 − 4 · Right
Card R 16 (exaggerated) · border 1px · dark image so the corners can be read
ABCNELFR
People full · Branches md 8 · Right
ABCNLPTM
People in two shapes · Wrong
ABCNLPTM
Stack · 2px ring in the surface color · Right

Flush media is clipped, not rounded. An image that runs to the edge of a card should have no radius of its own; give the card overflow: hidden (or overflow: clip) and the browser clips the image to the card's inner edge, whose radius is the card's radius minus its border, exactly. An image rounded by hand to the card's radius sits inside a 1px border with a 1px-too-large corner and leaves a sliver; an image not rounded at all pokes through the corner, as on the left. Inset media follows section III: a cover 4px inside an 8px card is 4. Free-standing images (a gallery tile, a photo in an article) take the container step, md, because they are objects.

Avatars are shapes and take full, everywhere, at every size: a circle says "a person" so consistently across the industry that a square person reads as an organisation. That gives the second shape its job. Teams, branches, workspaces, and other non-people get a rounded square at md, and the distinction then carries meaning at a glance in a mixed list. An overlapping stack separates its avatars with a 2px ring in the surface color, which is a border by another name: the one place a 2px edge is not a state, because it is drawn in the background color and reads as a gap.

The Squircle Question

260 × 190 · circular r 52 (dashed) vs continuous (solid, exaggerated)
RenewRenew
At r 4 on a 36px button · The difference is under a pixel

Apple draws its corners as continuous curves: the curvature ramps up from the straight side instead of jumping to a constant arc, which removes the faint kink where a circular corner meets its edge and makes large rounded shapes look smoother. The difference is real, and the figure exaggerates it to show where: at a 52px radius on a large surface, the continuous corner starts turning earlier and sits tighter on the diagonal. CSS has begun to gain a native form of it in the corner-shape property, which ships in Chromium first.

For product UI, border-radius is enough. At the radii this chapter recommends, 4 to 12px, the two curves differ by less than a pixel, and nobody can see it on a button or a card. The squircle matters for icons, app tiles, and large hero surfaces at 24px and up, where it is a brand decision; and if a system adopts it, it adopts it everywhere through the same tokens, never on one component.

The container decides the media's corner. Clip what's flush, nest what's inset, and keep the circle for people.

X. Character: Reading a Product by Its Corners

Pick one character for the whole product, write it as four role values, and apply it everywhere; any of the four honest characters works, and mixing two of them is the failure users feel without being able to name. The switcher below changes only the role variables on one screen.

Eastwick LibraryCatalogueLoansPatronsSearch titles, authors…JA
Catalogue / AcquisitionsNew this month
Export listAdd item
All24On shelf17On loan7
Field Notes on Tidal FlatsM. Ellery · 2019
On shelfReserve
The Salt Road AtlasD. Varga · 2022
On loanReserve
A Short History of BellsI. Okon · 2021
On shelfReserve
Sharp · controls 0 · fields 0 · containers 0 · chips 0 · technical, editorial, institutional Neutral · controls 4 · fields 4 · containers 8 · chips full · the reference scale · contemporary, quiet Friendly · controls 8 · fields 8 · containers 12 · chips full · approachable, still a tool Consumer · controls full · search full · containers 16 · chips full · informal, energetic Mixed · pill buttons · 2px search · square cards with 8px covers · 4px chips · Wrong One screen, five settings of four role variables

Each honest character is internally consistent, and each reads as a different kind of product before the first word is read. Sharp is technical and editorial: data tools, developer tools, institutions, newsrooms. It demands the most precise spacing, because there are no soft corners to forgive a misaligned edge. Neutral is the contemporary default and the reference scale of this chapter: it says nothing in particular, which is what most work software should say. Friendly rounds everything one step: still a tool, but one that wants to be approachable, common in consumer-facing SaaS. Consumer makes controls pills and containers soft, and it is the right choice for products used occasionally, on phones, by people who didn't choose the software. The ranges agree with Button Taxonomy I's shape table; this chapter adds that the button's choice must be the whole product's.

CharacterControl · field · container · overlayReads asFits
Sharp0 · 0 · 0 · 0Precise, authoritativeAnalytics, developer tools, editorial, institutional.
Neutral4 · 4 · 8 · 12Contemporary, quietMost work software. The default when nothing argues otherwise.
Friendly8 · 8 · 12 · 16ApproachableConsumer-facing SaaS, education, health.
Consumerfull · 12 (full if short) · 16 · 24Informal, energeticOccasional-use and mobile-first products.

The consumer row keeps text fields at 12 rather than full, following Text Inputs I §III: a pill is right on a short search field and peculiar on a full-width one. That's the only place a character's controls disagree, and it is principled: the field is a different class from the button once it gets long.

How to Pick, and Why Mixing Fails

Pick from the product's posture, not from taste: who uses it, how often, and how much they need to trust its precision. Then hold it. The Mixed setting is what drift produces when several teams each pick well: pill buttons from the marketing site, a 2px search field from an old component library, square cards from a data team, rounded covers from a design-tool template. No single choice is wrong, and the screen reads as nothing. The fix is never to round or sharpen one more component; it is to reset the four role values and let every component inherit them.

Character is four numbers. Choose them for the product's posture, write them once, and the corners stop being anyone's opinion.

XI. Auditing a Screen

Count the distinct radii on a screen: the count should equal the number of steps in use, and on most screens that is three or four. Here is section I's screen after one pass of the audit: same components, same content, four values.

Eastwick LibraryCatalogueLoansPatronsSearch titles, authors…smJA
Catalogue / AcquisitionsNew this month
Export listsmAdd itemsm
All24fullOn shelf17On loan7
sm = md − 4
Field Notes on Tidal FlatsM. Ellery · 2019
On shelfReserve
md
The Salt Road AtlasD. Varga · 2022
On loanfullReservesm
md
A Short History of BellsI. Okon · 2021
On shelfReserve
1px
4 values · none, sm, md, full · 1 border weight · every nested corner concentric or a smaller step · no doubled rules After the audit · Same components, same content · Corners taken from the scale Nothing on the screen is more or less rounded than before on average. What changed is that each corner now says which class it belongs to.
CheckFound in §IFix
Distinct radii2, 4, 6, 8, 10, 12, 16, plus 0 and fullnone, sm 4, md 8, full: the four steps this screen's classes need (§II).
Uncanny ratios12 on a 26px search, 10 on 22px chips, 6 on 18px statusesSearch at sm; chips and statuses full (§IV).
Inner vs outer12px cover in an 8px card; square cover in another; pill button in a square cardCovers at md − 4 = sm; buttons at the control step (§III).
Border weights2px on the "featured" card1px everywhere; featured is a badge, not an edge (§V).
Stacked cuesPanel with border, fill, and shadowA docked region: square, one hairline on its inner edge (§IV, §VI).
Doubled rulesHeading rule on the box's top; last row's rule on its bottomDividers between rows only; no rule under the heading (§VII).

The Method

Count the radii. Every distinct computed border-radius should be a step, and the number of distinct values should be the number of classes on the screen. The console makes the count exact and finds the two nesting failures at once: a child rounder than the nearest rounded ancestor, and borders at 2px that aren't focus or selection.

const r = el => parseFloat(getComputedStyle(el).borderTopLeftRadius); const radii = new Map(), rounder = [], heavy = []; document.querySelectorAll('body *').forEach(el => { const v = r(el), cs = getComputedStyle(el); if (v) radii.set(v, (radii.get(v) || 0) + 1); let p = el.parentElement; while (p && !r(p)) p = p.parentElement; if (p && v > r(p) && v < 999) rounder.push(el); // shapes (full) are exempt if (parseFloat(cs.borderTopWidth) >= 2) heavy.push(el); }); console.table([...radii].sort((a, b) => a[0] - b[0])); // one row per step, or a bug console.log({ rounder, heavy });

Find the uncanny ratios. For every element whose radius isn't full, divide by its height; anything between a third and a half is a pill written as a number. Find stacked cues. Any element at level 0 with a border, a non-transparent background different from its parent's, and a box-shadow is wearing three answers. Find doubled rules. Look at the ends of every list and table, and wherever a toolbar meets the table under it; two 1px lines touching read as one 2px line, and the screenshot at 2× shows them plainly. Focus every control. Tab through the screen and check that each ring follows its control's corner outward, that nothing moves, and that pills get pill rings.

On a Phone

Mobile is a reducing layer, and for corners it reduces one thing: things that were floating become docked. A dialog that becomes a bottom sheet keeps lg on its two free top corners and goes square on the three edges it shares with the screen; a card grid that becomes a full-width list loses its card corners and becomes rows with dividers. The scale and the character don't change at all, which is the point of having them.

Count the corners before arguing about them. A screen should have as many radii as it has classes of thing, and every one should be the name of a step.

XII. The Decision Sequence

Decide corners and edges once, for the system, in this order; decided per component, they drift into section I's screen within a release. Each step depends on the ones before it.

1
Choose the characterSharp, neutral, friendly, or consumer, from the product's posture. One, for everything.
2
Write the scaleFour steps a base unit apart, then full: none, sm, md, lg, full. Values from the character.
3
Assign classesDocked none, controls sm, containers md, overlays lg, shapes full. Components consume roles, never steps.
4
Fix the nesting ruleHugging children derive r = R − d; children farther in take their own, smaller step. Never rounder inside.
5
Fix the hairline1px for every edge; tinted alpha, four tokens: subtle, default, strong, inverse. 2px only for focus and selection.
6
Decide what bounds whatObjects get a border, regions a fill, groups nothing. Shadow only above the page, per Elevation.
7
Write the control contractEdges change color, never width. Focus is an outline, offset 2, concentric. Dividers between rows, inset to the text.
8
AuditCount distinct radii and 2px borders on the busiest screens each release; tab through every form.

Steps one through seven are tokens and component contracts, and they change only when the product changes character. Step eight is the habit that keeps them true: one console snippet and one pass with the Tab key.

What the Best Systems Avoid

Radius values in components. A border-radius with a literal anywhere but the token file. Each one is a step nobody named, and seven of them are section I's screen.

Pills written as numbers. A 10px radius on a 20px chip is a pill only until the chip changes size. Write 9999px.

Inner corners rounder than outer ones. The cover, the selected segment, the menu item, the pill button in a square card. Hugging children are concentric; the rest take a smaller step.

Two-pixel borders at rest. They spend the only weight that means "focused" or "selected," and they move content when they appear.

Border, fill, and shadow on one flat surface. One cue per surface on the page; shadow only above it.

Rules on both sides of an edge. A heading rule on a bordered box, the last row's rule on the container's bottom. Where two edges meet, delete one.

This part has been about the static edge: the corner, the hairline, and the rules that relate them. Part II takes up the edge under pressure: borders in dark mode and on imagery, selection outlines across dense collections, and how corners and edges behave as surfaces change size and state.

Part I of Border & Radius.
A product has one corner. Everything else is that corner at a different size.