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

Content with border on all sides

Top

Content with top border

Bottom

Content with bottom border

Left

Content with left border

Right

Content with right border
<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)

1.5px border

Medium

2px border

Large

4px border
<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)

Solid border

Dashed

Dashed border

Dotted

Dotted border
<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)

Strong, prominent border

Secondary

Medium, neutral border

Faded

Subtle, light border
<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

4px radius

Small

6px radius

Medium

10px radius

Large

16px radius

Extra Large

24px radius

Pill

Fully rounded
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

Composed border

Bottom + large + primary

Composed border

All sides + faded + dotted

Composed border
<div class="border-top border-m border-dashed border-secondary">
  Composed: top + medium + dashed + secondary
</div>

Was this page helpful?

We use this feedback to improve our documentation.

Thanks for your feedback