Spacing and size
Overview
Wave uses comprehensive size, spacing and border radius scales.
As much as possible, Wave tries to make use of this scales rather than generating custom sizing rules to ensure more harmonious and organized visual layout.
All our sizing values are set in rem.
If you need to translate rem
sizes to pixel sizes, multiply rem
value by
16
.
#
Size tokensSize tokens are anchored around base spacing unit of 0.25rem
, which translates to 4px
by default in browsers.
Size tokens follow one base unit increments for smaller dimensions, and up to four base unit increments for larger dimensions.
0.125rem
2px
0.25rem
4px
0.375rem
6px
0.5rem
8px
0.75rem
12px
0.875rem
14px
1rem
16px
1.25rem
20px
1.5rem
24px
1.75rem
28px
2rem
32px
2.25rem
36px
2.5rem
40px
2.75rem
44px
3rem
48px
4rem
64px
4.5rem
72px
5rem
80px
6rem
96px
7rem
112px
8rem
128px
#
UsageSize scale values can be applied to common CSS dimensions properties such as width
, height
, maxWidth
or maxHeight
.
#
Spacing tokensSpacing tokens are selection of values from the size tokens above. Values on the scale are non-linear with a progressively larger increment each step. Spacing tokens can be used inside of components and between components for layout spacing.
0.25rem
4px
0.5rem
8px
1rem
16px
1.5rem
24px
2rem
32px
3rem
48px
4.5rem
72px
#
UsageSpacing scale values can be applied to common CSS layout spacing properties such as margin
, padding
or gap
. To create the space around components, it's recommened to use Flex layout component.
#
Radius tokensBorder radius tokens define the standard corner radius of the components.
Different sizes of border radius are used according to the component size. Smallest radius is used for small components such as input fields, while medium radius is used for more prominent elements such as large buttons or dialogs.
0.25rem
4px
0.375rem
6px
0.5rem
8px
0.75rem
12px
1rem
16px
100vh
#
UsageBorder radius values can be applied to borderRadius
CSS property.