- Docs
- Foundations
- 03 of 05
Spacing
Space on a 4px grid, near-square corners and three densities.
- Grid
- 4pxEvery space a multiple
- Space steps
- 9From 4px to 64px
- Densities
- 3Compact to comfortable
- Size classes
- 5Compact to extra large
01
Space
Every padding and gap is a step on the 4px grid; each cell of a bar is 4px.
All 19 spaces and sizes sit on the 4px grid, at every density
02
Scale
One 4px scale under every name: each step, and the tokens that use it at default density.
| Step | Value | To scale | Tokens |
|---|---|---|---|
| 100 | 0.25rem · 4px | ||
| 200 | 0.5rem · 8px | ||
| 300 | 0.75rem · 12px | ||
| 400 | 1rem · 16px | ||
| 500 | 1.25rem · 20px | — | |
| 600 | 1.5rem · 24px | ||
| 800 | 2rem · 32px | ||
| 1200 | 3rem · 48px | ||
| 1600 | 4rem · 64px |
03
In use
A form as it ships, its space drawn as redlines. Switch the density above and the gaps follow.
- 1Padding inside the card · 1rem · 16px
- 2Between the fields · 0.75rem · 12px1rem · 16px1.25rem · 20px
- 3Between the buttons · 0.5rem · 8px
04
Radius
Four corner values, shared by role and drawn at 4×. Only people, choices and tags read round.
- Small marks that stay square: a checkbox, a switch track, a keyboard key.
- Buttons, fields, selects: every control. Fields round only their top corners.
- Cards, panels and other containers.
- Menus, popovers and other floating surfaces.
- Dialogs and drawers.
- Status tags: full pills.
- People and choices that must read round: avatars, radios, presence dots.
05
Control sizes
Real controls at each height. Heights and values follow the Density toolbar.
| Name | Role |
|---|---|
| Priya Sharma | Owner |
| Rahul Verma | Admin |
06
Density
The same form at each density; each panel pins data-qx-density.
| Name | Role |
|---|---|
| Priya Sharma | Owner |
| Rahul Verma | Admin |
| Name | Role |
|---|---|
| Priya Sharma | Owner |
| Rahul Verma | Admin |
| Name | Role |
|---|---|
| Priya Sharma | Owner |
| Rahul Verma | Admin |
| Token | compact | default | comfortable |
|---|---|---|---|
| --qx-size-control-sm | 1.5rem · 24px | 1.75rem · 28px | 2rem · 32px |
| --qx-size-control-md | 1.75rem · 28px | 2rem · 32px | 2.25rem · 36px |
| --qx-size-control-lg | 2rem · 32px | 2.5rem · 40px | 2.75rem · 44px |
| --qx-size-row | 2rem · 32px | 2.5rem · 40px | 3rem · 48px |
| --qx-space-form-gap | 0.75rem · 12px | 1rem · 16px | 1.25rem · 20px |
07
Breakpoints
Window size classes, to scale. The marker shows this window's width.
- compact
0–599px - medium
600–839px - expanded
840–1199px - large
1200–1599px - xlarge
1600px and up
| Class | CSS | JavaScript | Grid key |
|---|---|---|---|
| compact | — | — | base |
| medium | @media (--qx-viewport-medium) | BREAKPOINT.medium | medium |
| expanded | @media (--qx-viewport-expanded) | BREAKPOINT.expanded | expanded |
| large | @media (--qx-viewport-large) | BREAKPOINT.large | large |
| xlarge | @media (--qx-viewport-xlarge) | BREAKPOINT.xlarge | xlarge |
08
Component sizes
Fixed geometry for a few components, drawn to scale and exported as COMPONENT.
09
In code
Space is a token, never a number. A density set on a container reaches everything inside it.
.invite-card {
padding: var(--qx-space-inset-lg);
display: grid;
gap: var(--qx-space-form-gap);
}
.invite-actions {
display: flex;
gap: var(--qx-space-gap-sm);
}import { Button, Stack, TextField } from "@qeetrix/react";
export function Invite() {
return (
<div data-qx-density="compact">
<Stack gap="lg">
<TextField label="Work email" />
<TextField label="Display name" />
</Stack>
<Button>Invite</Button>
</div>
);
}