Borders

Discover how to utilize and customize borders in Design Blocks to enhance the layout and visual rhythm of your project.


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

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

Overriding the default borders

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

ts
const [lightThemeTokens] = createTokens({
  theme: {
    tokens: {
      borders: {
        true: 4,
        sm: 8,
        md: 10,
        lg: 16,
      },
    },
  },
});

Borders tokens

Design Blocks ships with the following borders tokens by default:

NameValue
none0
true1
sm2
md6
lg8
xl12
2xl16
3xl20
4xl24
5xl28