Spacing and radius
Use PaymentSpace for spacing and PaymentRadius for corner roles. Resolve them from the current theme rather than repeating numeric values at component call sites.
The scale is 4 / 8 / 12 / 16 / 24 / 32 on the 8 base: an 8 pt grid with 4 pt half-steps, so block (12) is on the grid. Every kit spacing value resolves through theme.space(PaymentSpace.<role>), and one role uses one value: icon → text uses block (12) in the toast, banner, state message, accordion, skeleton, list row and status header alike.


| The gap is… | Role |
|---|---|
| No gap | none |
| Within one label | inline |
| Between related rows or actions | related |
| Between an icon and row text, or row padding | block |
| A gutter, or between a label and its value | group |
| Before a primary action or a ruled section | section |
| The largest reserved gap | major |
Spacing scale
Section titled “Spacing scale”Values use the default 8 dp base. Each bar shows the value at 4 CSS pixels per dp; none has zero width.
| Token | Value | Use | Don't |
|---|---|---|---|
none | 0 dp | No gap. | — |
inline | 4 dp | Label to caption, title to message, title to meta, a small glyph beside its text, a field's label above its box at large text. | Not between rows. |
related | 8 dp | Between stacked or adjacent actions and chips, text to a trailing control, compact control padding. | Not icon to text: that is block. |
block | 12 dp | Icon to text, band to title, list row and header padding, notice and banner padding. | — |
group | 16 dp | Screen, sheet and field gutters, label to value, state message padding. | No gutter other than 16 at any width. |
section | 24 dp | Content to primary action, between field groups, ruled section gaps. | — |
major | 32 dp | Largest gap, unused by kit widgets today. | — |
Radius roles
Section titled “Radius roles”PaymentTheme.radius (default 8) is the box role and the base of the others. A theme may set tagRadius, controlRadius or sheetRadius to change one role; an unset role keeps its multiple: tag 0.5 (4), control 0.75 (6), sheet 1.5 (12). PaymentRadius and the theme getters (tagBorderRadius, controlBorderRadius, borderRadius, sheetBorderRadius) resolve the current role. See Corner roles.
Each 64 CSS pixel square shows the top-left corner of a 48 dp tile at 8× magnification (8 CSS pixels per dp). The window covers 8 dp in each direction, making small radii visible. The unbounded circle token (999, pill) is shown separately as a complete 64 px circle, rather than a corner detail.
| Token | Value | Use | Don't |
|---|---|---|---|
none | 0 dp | No rounding. | — |
tag | 4 dp | Badges, tags, skeletons. | Not buttons. |
control | 6 dp | Controls, menus, notices, tooltip and toast. | Not sheets. |
box | 8 dp | Selectable boxes and promo card layout. | Not nested inside another box with radius 8. |
sheet | 12 dp | Sheet tops and dialogs. | Not inline content. |
circle | 999 (pill) | Existing navigation pill; round controls. | — |
Fixed radii
Section titled “Fixed radii”These component details are fixed literals in lib/, not PaymentRadius roles or exported tokens. This static list links to each source; the 24 dp focus ring is separate from the 999 pill token. Except for the focus ring, corner details use the same 8× magnification (8 CSS pixels per dp) in 64 px windows. The meter / chart row shows top-left and bottom-left details: chart bars round only their top corners.
24 on a 48 dp square is a circle; it differs from 999 only on wider shapes.
| Component detail | Radius (dp) | Corner detail | Source |
|---|---|---|---|
| Icon-button focus ring | 24 | Whole 48 dp control at 4/3× (64 px) | actions.dart |
| Status band | 3 | primitives.dart |
|
| Meter / chart bar tops | 2 | BalanceCard |
|
| Step bar | 1.5 | payment_extras.dart |
|
| Navigation indicator | 1 | navigation.dart |
Component sizes
Section titled “Component sizes”Heights and boxes are component sizes, not spacing roles, so they are not PaymentSpace values. They sit on the 4 grid: 36 (small button, InfoRow pitch), 40 (media tile), 48 (minimum target, list row, small field), 52 (the _ControlRow control column), 56 (medium field, large button), 60 (video play disc) and 64 (large list row, large field). A two-line list row is 62 dp (12 + 20 + 18 + 12): its parts are on the grid, and the loading skeleton copies it. The spacing scale and standard component heights use the 4 dp grid. Fixed bar thicknesses and strokes are exceptions: StatusBand is 6 dp high (primitives.dart:1063), and the step bar is 3 dp high (payment_extras.dart:349). These are component details, not spacing roles.
Stripe mapping
Section titled “Stripe mapping”| Stripe size | PaymentSpace |
|---|---|
| xxsmall | inline |
| xsmall | related |
| small | block |
| medium | group |
| large | section |
| xlarge, xxlarge | major |
| Stripe radius | PaymentRadius |
|---|---|
| none | none |
| xsmall | tag |
| small | control |
| medium | box |
| large | sheet |
| rounded | circle |
Use theme.space to preserve the host base unit. The default gutter is 16 at every width. Nested radii must be concentric: inner rounding is smaller than outer rounding. Sections stay flat and separated by space.
Do: EdgeInsets.all(theme.space(PaymentSpace.group)), the named version of existing screen gutters. Don’t: EdgeInsets.all(16).
final theme = PaymentTheme.of(context);final gutter = EdgeInsets.all(theme.space(PaymentSpace.group));Size is small, medium (default), large; width is fill (default) or hug. All labels wrap. PaymentButton and fields already consume PaymentSize; interactive layout and hit boxes remain at least 48×48 dp regardless of visual size. PaymentBox implements token-based padding, gaps, radius and width.
PaymentSpace
enum PaymentSpace · lib/src/foundation/payment_tokens.dart
Spacing roles resolved by PaymentTheme.space; nothing else exists.
The scale is 4 / 8 / 12 / 16 / 24 / 32 on the 8 base (D46). Each role below has one value; a gap that serves a listed role uses that role and no other. Component sizes (36, 40, 48, 52, 56, 60, 64 dp) are sizes, not spacing roles.
| Value | Description |
|---|---|
none | Zero gap. |
inline | spacing × 0.5 (4): label → caption, title → message, title → meta, a small glyph beside its text, a field's label above its box at large text. |
related | spacing (8): between stacked or adjacent actions and chips, text → trailing control, compact control padding. |
block | spacing × 1.5 (12): icon → text, band → title, list row and header padding, notice and banner padding. |
group | spacing × 2 (16): screen, sheet and field gutters, label → value, state message padding. |
section | spacing × 3 (24): content → primary action, between field groups, ruled section gaps. |
major | spacing × 4 (32): largest gap; unused by kit widgets today. |
PaymentRadius
enum PaymentRadius · lib/src/foundation/payment_tokens.dart
Corner roles for PaymentBox and PaymentImage.
| Value | Description |
|---|---|
none | BorderRadius.zero. |
tag | tagBorderRadius (4 by default). |
control | controlBorderRadius (6 by default). |
box | borderRadius (8 by default). |
sheet | sheetBorderRadius (12 by default). |
circle | BorderRadius.circular(999), existing navigation pill. |
PaymentSize
enum PaymentSize · lib/src/foundation/payment_tokens.dart
Visual size only; layout box and hit area stay at least 48×48 dp. Components document their heights.
| Value | Description |
|---|---|
small | Module headers, table or chip rows; never the main action. |
medium | Default, today's visual size. |
large | One primary action on a full-screen wide view. |
PaymentWidth
enum PaymentWidth · lib/src/foundation/payment_tokens.dart
Width policy; labels wrap and never truncate.
| Value | Description |
|---|---|
fill | Parent width, the default. |
hug | Content width. |
Layout foundation
Section titled “Layout foundation”Use PaymentBox gap to space siblings from tokens. Fill needs a bounded parent; use hug inside a Row.