Skip to content

Spacing, shape & motion ​

Spacing ​

Spacing is set per layout role rather than from a numeric scale. Rows are tuned to the pixel to keep the interface dense, so use these tokens instead of inventing new gaps.

TokenUse
--page-padpage edges
--gutter-panelsbetween panels
--panel-header-padpanel header
--panel-body-padpanel body
--gutter-field-gridbetween fields
--field-row-padinside a field value
--table-row-padtable and list rows
--modal-body-pad, --modal-footer-padmodals
--touch-target-minminimum hit target on tablets
foundations-tokens--spacing-and-motionOpen in Storybook ↗

Shape ​

The corner radius shows what an element does: a pill starts something safe, a rectangle acts immediately (see principles).

TokenUse
--radius-chipchips, badges, add buttons
--radius-inputinputs, secondary buttons, dropdowns
--radius-buttonprimary and save buttons, menu items, tooltips
--radius-cardcards, panels
--radius-overlaymodals, popovers
--radius-pillpills: safe, reversible actions
--radius-roundcircles

Elevation ​

There are exactly two levels:

  • Cards and panels have a 1px border and no shadow.
  • Overlays float with a shadow: --shadow-overlay (menus, listboxes), --shadow-popover, --shadow-modal and --shadow-toast.

A card never gets a shadow.

foundations-tokens--shape-and-elevationOpen in Storybook ↗

Motion ​

Motion is short and functional:

  • one duration (--transition-duration-ui) and one easing (--ease-ui) for hover and state changes;
  • a slight scale-down on press (--scale-press);
  • no entrance animations on overlays, no bouncing or sliding.

Principles · Colour

Powered by Elody - Open Source Semantic Data Platform