Border
Defined in packages/pixel/tokens/borderRadius.css and borderWidth.css.
Border radius
The corners of shapes and elements.
| Token | Value | Sample |
|---|---|---|
--border-radius-none | 0 | |
--border-radius-sm | 8px | |
--border-radius-md | 16px | |
--border-radius-lg | 24px | |
--border-radius-pill | 500px | |
--border-radius-circular | 50% |
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.
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.
| Token | Value | Sample |
|---|---|---|
--border-width-none | 0 | |
--border-width-hairline | 1px | |
--border-width-thin | 2px | |
--border-width-thick | 4px | |
--border-width-heavy | 8px |
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.