Kwark. Design System
Open Kwark

Radius

Four corners, each for one kind of thing, a rule for corners inside corners, and the paper that is never rounded more than paper is.

Basics
6 control
10 card
14 sheet
999 pill

Four corners

A corner says what kind of thing something is. A field and a button have small corners because they are small and precise; a card has a softer corner because it holds several things; a sheet or dialog has the softest because it is a surface laid over the page. A pill is a token you pick up and put down. Four sizes, and every rounded thing in Kwark takes one of them.

Token Value For Examples in the app
--k-radius-control 6px Things you press or type into Button, IconButton, TextButton, inputs, menu items, breadcrumb items (--k-crumb-radius)
--k-radius-card 10px Things that hold other things Cards, dropdown menus (DropdownMenu.css), the segmented control’s track, the timeline loupe
--k-radius-sheet 14px Surfaces laid over the page Dialogs on a desktop (Modal), the phone bottom sheet’s top corners (.k-sheet), the phone tools menu in the editor
--k-radius-pill 999px Tokens and the round buttons Chip, badges, the phone dial and its items, the sheet’s grab handle, the loader ring

There is no 4, 8, 12 or 16 among them for interface surfaces. Paper has its own corner (below).

Use --k-radius-control, --k-radius-card, --k-radius-sheet or --k-radius-pill. Never write a px radius in a component, except inside a nested element where the rule below gives a calculated one, and then write it as calc() of the token.

Corners inside corners

When a rounded thing sits inside another with padding around it, the inner corner is the outer corner minus the padding. Otherwise the gap between the two curves is thicker at the corner than along the sides, and the inner shape looks pinched.

inner radius = outer radius − padding

Kwark already does this in two places, and both are the reference:

  • Segmented control. The track has --k-radius-card (10px) and 2px of padding; each choice has calc(var(--k-radius-card) - 2px), 8px (components/ui/system.css).
  • Screenplay timeline. The track has an 8px corner; each scene block sits 3px in and has a 5px corner (editor.css, .timeline-bar__track and .timeline-bar__scene).

If the padding is equal to or larger than the outer radius, the inner element is square or takes --k-radius-control, whichever is larger. A 16px-padded card never has 0px corners on the button inside it; the button keeps its own 6px.

<div style="display:inline-flex;padding:2px;border:1px solid var(--k-line);border-radius:var(--k-radius-card);background:var(--k-surface)">
  <button type="button" aria-pressed="true" style="height:30px;padding:0 var(--k-space-4);border:0;border-radius:calc(var(--k-radius-card) - 2px);background:var(--k-raise);color:var(--k-text);font:500 var(--k-fs-meta)/1 var(--k-font-ui);cursor:pointer">Cards</button>
  <button type="button" aria-pressed="false" style="height:30px;padding:0 var(--k-space-4);border:0;border-radius:calc(var(--k-radius-card) - 2px);background:none;color:var(--k-text-2);font:500 var(--k-fs-meta)/1 var(--k-font-ui);cursor:pointer">List</button>
  <button type="button" aria-pressed="false" style="height:30px;padding:0 var(--k-space-4);border:0;border-radius:calc(var(--k-radius-card) - 2px);background:none;color:var(--k-text-2);font:500 var(--k-fs-meta)/1 var(--k-font-ui);cursor:pointer">Board</button>
</div>
<div style="display:inline-flex;padding:var(--k-space-2);border:1px solid var(--k-line);border-radius:var(--k-radius-card);background:var(--k-surface)">
  <div style="width:120px;height:44px;border-radius:calc(var(--k-radius-card) - var(--k-space-2));background:var(--k-raise)"></div>
</div>
<div style="display:inline-flex;padding:var(--k-space-2);border:1px solid var(--k-line);border-radius:var(--k-radius-card);background:var(--k-surface)">
  <div style="width:120px;height:44px;border-radius:var(--k-radius-card);background:var(--k-raise)"></div>
</div>

The first two follow the rule. The third puts a 10px corner 8px inside a 10px corner: look at how much thicker the gap is at the corners than at the sides.

Paper is paper

A sheet of paper has a corner of almost nothing. Everything in Kwark that stands for a printed page keeps that.

  • The screenplay page has a 4px corner on a desktop and is square on a phone, where it runs to the edges of the screen (editor.css: border-radius: 4px inside the desktop query, 0 inside the compact query).
  • The call sheet and other production paper (.po-paper) are the same: 4px on a desk, square on a phone.
  • Stripboard strips are 5px, with the grip at the strip’s left end rounded only on its outer side (5px 0 0 5px) so the two read as one strip.
  • Timeline scene marks on the phone strip are square, so one scene butts against the next without a gap that would read as a pause. The rail they sit on is 3px.

Never give a page, a call sheet, a strip or a storyboard panel a card’s 10px corner. It turns a document into a widget.

What is never rounded

  • The edge of the screen. A sheet that rises from the bottom of a phone has rounded top corners and square bottom ones; a full-screen panel is square.
  • Table cells, grid lines and the stripboard’s day breaks.
  • The focus ring’s own shape: it follows the element’s corner, plus its 2px offset.
  • Text selection, the caret and revision marks in the script.
  • A full-bleed image. A poster or a storyboard frame inside a card takes the card’s corner minus its padding, or no corner if it touches the card’s edge, with overflow: hidden on the card.

Known differences in the app

  • The Modal on a phone becomes a bottom sheet with 32px top corners (rounded-t-[2rem]), not --k-radius-sheet. The newer Sheet uses the token. New work uses Sheet.
  • The toast uses a 12px corner (rounded-xl), between card and sheet. It should take --k-radius-card.
  • The editor’s tool rail buttons use 9px. They should take --k-radius-control or --k-radius-card.

These are recorded so nobody copies them; they are fixed when the file is next touched.

A dialog at 14px containing a 6px text field and two 6px buttons. A list inside a 10px card whose first and last rows are clipped by the card (overflow: hidden), not rounded themselves.

Do

A dialog at 24px with 12px fields and pill buttons, so every element has a different corner and nothing reads as part of the same object.

Don’t

AI readiness test

Task. Design a “Scene 12” card for the outline’s index-card view with a header strip, the scene’s summary, and two buttons inside it.

Give the agent. This page, Spacing, Elevation.

Constraint. Use only the four radius tokens and calc() from them. The card must look like it belongs beside the existing outline cards.

A reliable answer

  • Card uses --k-radius-card (10px) and no shadow at rest
  • Header strip touches the card edge and is clipped by overflow hidden, not separately rounded
  • Buttons keep --k-radius-control (6px)
  • Any inset element uses calc(var(–k-radius-card) - padding)
  • No 4px or 12px literal values

Give this Markdown to your coding agent or share its URL.

Open .mdllms.txt
Loading…