Spacing & layout
A 4px scale and ruled columns.
Layout in this system is two things: a 4px spacing scale, and rules that mark where things begin and end.
The 4px scale
Every gap, padding, and margin in the library comes from this scale. Nine steps is enough for an entire application; a tenth would go unused.
Steps 1–4 handle component internals: gap between a label and its control, padding inside a button, the space between an icon and its text. Steps 5–9 handle page structure.
Square by construction
The rule that gives the system its character is that there are no rounded corners anywhere. It is enforced by one token:
:root {
--fr-radius: 0px;
}Every component's border-radius is var(--fr-radius). Nothing overrides it locally. That means the geometry cannot drift component by component, and a consumer who genuinely wants rounding changes the one token — knowing exactly what they are doing to the entire system.
Rules, not shadows
Edges are drawn with 1px rules. There is exactly one shadow in the whole system, and it has no blur:
--fr-shadow-hard: 3px 3px 0 var(--fr-rule-strong);It appears on Dialog and on cards that opt in with raised. It is a hard offset — the same mark a screen printer would make — so it reads as a drawn edge rather than a gradient pretending to be depth.
| Device | Used for |
| --- | --- |
| --fr-rule-soft | Dividers inside a card, table row separators |
| --fr-rule | Card, table, dialog, and code-block outlines; section boundaries |
| --fr-rule-strong | Control edges — secondary buttons, checkboxes, radios, switches — and the hard shadow |
| 2px --fr-ink | Active tab marker, active rail item |
| 2px --fr-accent | Focus rings, blockquote edge |
A boundary between regions is a hairline tone, so the page reads as one surface rather than a wireframe. Only a control earns the strong rule, because a control's edge has to be identifiable at 16px and that is an accessibility floor rather than decoration.
The ruled grid
Because cards and tables share the same 1px rule, they can sit edge to edge and look like one continuous grid. This is the trick that makes a page of separate components read as a single technical drawing:
<div style={{ display: "grid", gridTemplateColumns: "repeat(3, 1fr)" }}>
<Card>…</Card>
<Card>…</Card>
<Card>…</Card>
</div>Collapse the double rules between them with a negative margin on the container, or accept the 2px join — both read correctly. The catalogue on the landing page collapses them.
Control heights
Three heights, all on the scale, and every control shares them so a row of mixed controls aligns:
| Size | Height | Token |
| --- | --- | --- |
| sm | 28px | --fr-control-sm |
| md | 36px | --fr-control-md |
| lg | 44px | --fr-control-lg |
A Button and an Input at the same size have the same height and the same 1px rule weight, which is what makes them sit in a line without a wrapper.
Layout constraints
| Token | Value | Purpose |
| --- | --- | --- |
| --fr-measure | 68ch | Maximum body-copy width |
| --fr-container | 78rem | Maximum content container |
Long lines are the most common readability failure in dashboards. --fr-measure exists so you do not have to think about it: prose is capped, and everything else is allowed to be as wide as its data requires.