Borders use a composable architecture that separates positioning from styling. Structural classes define where the border appears, and combo classes modify width, style, and color independently. For border token values, see the Tokens page.
Structure
Structural classes define where the border appears. By default, borders use width, solid style, and color.
All sides
Top
Bottom
Left
Right
<div class="border">All sides</div>
<div class="border-top">Top only</div>
<div class="border-bottom">Bottom only</div>
<div class="border-left">Left only</div>
<div class="border-right">Right only</div>
| Class | Effect |
|---|---|
| Border on all sides | |
| Top only | |
| Bottom only | |
| Left only | |
| Right only |
Width
Width classes modify the border thickness. The default is .
Small (default)
Medium
Large
<div class="border border-m">Medium border on all sides</div>
| Class | Token | px Equivalent |
|---|---|---|
| 1.5px | ||
| 2px | ||
| 4px |
Style
Style classes modify the border appearance. The default is solid.
Solid (default)
Dashed
Dotted
<div class="border border-dashed">Dashed border</div>
| Class | Style |
|---|---|
| Solid (default) | |
| Dashed | |
| Dotted |
Color
Color classes modify the border color using semantic tokens.
Primary (default)
Secondary
Faded
<div class="border border-faded">Subtle border</div>
| Class | Token |
|---|---|
Radius
Border radius tokens control corner rounding. Apply them directly via CSS — there are no utility classes for radius.
Extra Small
Small
Medium
Large
Extra Large
Pill
border-radius: var(--radius-m);
| Token | Value |
|---|---|
| 4px | |
| 6px | |
| 10px | |
| 16px | |
| 24px | |
| 999px |
Composing Borders
Combine structural, width, style, and color classes to build any border you need. Each class modifies a single concern.
Top + medium + dashed + secondary
Bottom + large + primary
All sides + faded + dotted
<div class="border-top border-m border-dashed border-secondary">
Composed: top + medium + dashed + secondary
</div>