Space

A 4px grid, 32px controls and 36px rows.

Rules

  1. space-grid MUST Take every gap, padding and size from the 4px scale (p-1 is 4px, gap-2 is 8px) or a token; a 2px half step only inside a control. Because a hand-picked 13px puts one box off the grid and every edge beside it reads crooked.
    • Correct: <div className="gap-3 p-3">
    • Wrong: <div className="gap-[13px] p-[10px]">
  2. space-control-heights MUST Size a one-line control from --control-sm (26px), --control (32px) or --control-lg (36px), and a row from --row (36px). Because a control at its own height stops lining up with the pills beside it and with the 36px rows it sits in.
    • Correct: <div className="field"> // --control, 32px
    • Wrong: <div className="h-[30px] rounded-pill field">
  3. space-shell-inset MUST Keep a card panel --shell-inset (3px) inside its shell; it is the one value off the grid. Because the 14px shell less the 3px gap is the 11px panel, so the corners stay concentric only at that inset.
    • Correct: <div className="shell"><div className="panel">
    • Wrong: <div className="shell p-2"><div className="panel">
  4. space-compact SHOULD Pack tight: 8px between controls in a row, 12px inside a panel, 16px between groups, 24px between sections. Because Glaze is compact, and a 24px gap inside a card reads as two cards.
  5. space-touch SHOULD Give a small control on a touch screen room around it, 8px or more to its neighbours, rather than a bigger size. Because a 26px pill is below the 44px target, and space keeps a wrong tap off the button beside it.

Tokens

TokenRoleUse forNot forLight
--space-0-5an optical nudgeicon offset2px
--space-1the grid's step: icon to label in a tagthe grid step: icon to label in a tagbetween controls4px
--space-1-5icon to label inside a controlbutton, chip6px
--space-2between controls in a rowbetween controls in a rowinside a panel8px
--space-3a panel's padding, a field's text insetinside a panel, a field's text insetbetween sections12px
--space-4between groups in a formform, section gap16px
--space-5a dialog's paddingdialog20px
--space-6between sectionspage section24px
--space-8between page regionspage32px
--space-10a page's top paddingpage40px
--shell-insetthe gap between a card's shell and its panel: the 14px shell less the 11px panelthe card panel inside its shellanything else3px
--shell-foot-insetthe gap between the shell's edge and a footer action: the panel's 3px read as cramped beside a pilla card footer's actions from the panel and the shell's edgesthe panel inset6px
--control-sma small controlbutton sm, chip, footer action26px
--controlthe default controlbutton, input, select, segmented control32px
--control-lga large controlbutton lg, prompt input field36px
--rowone row of a list, menu or tabletable row, item, menu item36px
--icon-sman icon in a small control or a tagbutton sm, badge12px
--iconan icon in a controlbutton, input, menu item14px
--icon-lgan icon in a large control or on its ownbutton lg16px
--overlay-sma small dialogalert dialog400px
--overlaythe default dialog and sheet widthdialog, sheet480px
--overlay-lga wide dialog: a preview, the command palettedialog lg, command palette640px
--popovera popover's widthpopover288px
--toasta toast's width on a wide screen; full width less the gutter on a phonetoast360px
--menu-minthe narrowest a menu opensdropdown menu, select192px
--menu-rowone row of a menu or a command list, a step under --rowmenu item, command item32px
--menu-row-smone row of a small menu, opened from a small controlmenu item sm28px
--popup-maxthe tallest a list popup grows before it scrollsselect, combobox, menu320px
--tooltip-maxa tooltip's line length before it wrapstooltip256px
--label-colthe widest a label column grows before its labels wrapdata list, horizontal field160px
--progress-bar-sma small progress bar or meter, in a row or a card footerprogress sm4px
--progress-barthe thickness of a progress bar or a meterprogress6px
--progress-bar-lga large progress bar, the one task on a screenprogress lg8px
--progress-sweepthe length of the segment that slides along an indeterminate barprogress indeterminate32%
--measurea paragraph's longest lineprose, message68ch
--measure-hinta description or hint's longest linefield hint, card description60ch

Decision table

You needUse
Between buttons in a footergap-2 (8px)
Inside a card panelp-3 (12px)
Inside a control: label padding, icon gapa 2px half step: px-3.5, gap-1.5
A default control--control, 32px
A list or table row--row, 36px

Scale

Steps: 4, 8, 12, 16, 20, 24, 32, 40px, with 2 and 6px half steps inside controls only. Controls 26, 32, 36px. Rows 36px. Icons 12, 14, 16px.

Reject list

  • No arbitrary px values, no 44px desktop controls.
  • Radius: Pills for every one-line control, 14 and 11 for the card, 10 for overlays, 6 for tags.
  • Typography: Glaze Sans for every word, Glaze Mono at 0.8 of the text around it.