Skip to main content

Spacing

The spacing system is based on a 4px grid, which means that all spacing values are multiples of 4. This allows for a consistent and predictable layout across the design system. The spacing system is divided into two categories: primitives and semantics. The primitives are the base values that are used to create the semantic values. The semantic values are the ones that are used in the components. The spacing system is designed to be flexible and adaptable, allowing for different use cases and design needs. The values are defined in dp (density-independent pixels) to ensure that they are consistent across different screen sizes and resolutions.

Semantics

Semantic tokens are used to build components; they are what is used in the design system to build components, and what should be used in your projects.

NameValueFlutter ValueWeb TokenExample
None0dpZeta.of(context).spacing.none--spacing-none
Minimum4dpZeta.of(context).spacing.minimum--spacing-minimum
Small8dpZeta.of(context).spacing.small--spacing-small
Medium12dpZeta.of(context).spacing.medium--spacing-medium
Large16dpZeta.of(context).spacing.large--spacing-large
Xl20dpZeta.of(context).spacing.xl--spacing-xl
2xl24dpZeta.of(context).spacing.xl_2--spacing-2xl
3xl28dpZeta.of(context).spacing.xl_3--spacing-3xl
4xl32dpZeta.of(context).spacing.xl_4--spacing-4xl
5xl36dpZeta.of(context).spacing.xl_5--spacing-5xl
6xl40dpZeta.of(context).spacing.xl_6--spacing-6xl
7xl44dpZeta.of(context).spacing.xl_7--spacing-7xl
8xl48dpZeta.of(context).spacing.xl_8--spacing-8xl
9xl64dpZeta.of(context).spacing.xl_9--spacing-9xl
10xl80dpZeta.of(context).spacing.xl_10--spacing-10xl
11xl96dpZeta.of(context).spacing.xl_11--spacing-11xl

Primitives

These values are the base values that are used to create the semantic values.

We are showing them here for reference only; when using the design system, you should use the semantic values instead.

NameValueFlutter ValueWeb TokenExample
00dpZeta.of(context).primitives.x0--spacing-0
14dpZeta.of(context).primitives.x1--spacing-1
28dpZeta.of(context).primitives.x2--spacing-2
312dpZeta.of(context).primitives.x3--spacing-3
416dpZeta.of(context).primitives.x4--spacing-4
520dpZeta.of(context).primitives.x5--spacing-5
624dpZeta.of(context).primitives.x6--spacing-6
728dpZeta.of(context).primitives.x7--spacing-7
832dpZeta.of(context).primitives.x8--spacing-8
936dpZeta.of(context).primitives.x9--spacing-9
1040dpZeta.of(context).primitives.x10--spacing-10
1144dpZeta.of(context).primitives.x11--spacing-11
1248dpZeta.of(context).primitives.x12--spacing-12
1364dpZeta.of(context).primitives.x13--spacing-13
1480dpZeta.of(context).primitives.x14--spacing-14
1596dpZeta.of(context).primitives.x15--spacing-15