Sizes

Configure the spacing values used in your design system.


Use the sizes key in the extendTokens section of your blocks.config.ts file to extend the default sizes values.

ts
const [lightThemeTokens] = createTokens({
  theme: {
    extendTokens: {
      sizes: {
        // Configure your sizes here
      },
    },
  },
});

Overriding the default sizes

if you’d like to override the default sizes, you can do so using the theme.tokens.sizes section of your blocks.config.ts file:

ts
const [lightThemeTokens] = createTokens({
  theme: {
    tokens: {
      sizes: {
        xxs: 8,
        xs: 12,
        sm: 16,
        md: 24,
        lg: 32,
      },
    },
  },
});

Sizes tokens

Design Blocks ships with the following sizes tokens by default:

NameValue
none0
xxs4
xs8
sm12
md16
lg24
xl32
2xl40
3xl48
true48
4xl56
5xl64
6xl72
7xl80
8xl88
9xl96
10xl104
11xl112
12xl120
13xl128
14xl136
15xl144
16xl152
17xl160
18xl168
19xl176
20xl184
full'100%'