Skip to content

Design tokens / Border

Border ​

Defined in packages/pixel/tokens/borderRadius.css and borderWidth.css.

Border radius ​

The corners of shapes and elements.

TokenValueSample
--border-radius-none0
--border-radius-sm8px
--border-radius-md16px
--border-radius-lg24px
--border-radius-pill500px
--border-radius-circular50%

pill is for elements fully rounded at the ends — badges, tags, a width="fill" call to action. circular is for perfectly round elements like avatars.

?> pill is a large fixed length, not a keyword. On a box taller than 1000px the corners stop looking like a pill — which is why it belongs on controls, not on surfaces.

Where each is used by default: sm on buttons, inputs, covers and insets; md on cards.

preview
Code
html
<kb-stack direction="row" spacing="nano" align="center">
  <kb-button>Default (sm)</kb-button>
  <kb-button style="--button-border-radius: var(--border-radius-pill)">Pill</kb-button>
  <kb-button style="--button-border-radius: var(--border-radius-none)">Square</kb-button>
</kb-stack>

Border width ​

Border thickness.

TokenValueSample
--border-width-none0
--border-width-hairline1px
--border-width-thin2px
--border-width-thick4px
--border-width-heavy8px

hairline is the default for anything that borders a surface — inputs and outlined cards. thin is the button's border, so an outlined button reads as a control rather than a container.