Maple
⌘K
DOCUMENTATIONv2.0.17

Borders

Border utilities for structure, color, radius, and outlines. Use the short directional helpers for common one-pixel borders, or compose width, style, and color separately when you need more control.

Border Utilities

Border utilities are split by responsibility. The br class establishes the border itself, brc-* controls color, and rad-* controls corner rounding.

Utility
Property
Use Case
br
border

Apply a full 1px solid border.

brw-*
border-width

Control border thickness independently.

brst-*
border-style

Set styles like solid, dashed, dotted, or double.

brc-*
border-color

Use Maple colors, tones, alpha values, and tokens.

rad-*
border-radius

Round every corner with spacing values or radius tokens.

Basic Borders

The plain br utility creates a 1px solid border. Add a color utility such as brc-red or brc-red-600/50 to make the color explicit.

br
br brc-red
br brc-red-600/50

<!-- Simple border with browser default color -->
<div class="br">Default border</div>

<!-- Border with a css named color -->
<div class="br brc-red">Red border</div>

<!-- Border with tone and alpha -->
<div class="br brc-red-600/50">Subtle red border</div>

Width, Style, and Color

Use brw-*, brst-*, and brc-* when border parts should be controlled independently. Reserved CSS style keywords like dashed, dotted, and double are treated as literal values.

1px solid
2px dashed
4px dotted

<div class="brw-px brst-solid brc-red">1px solid</div>
<div class="brw-2px brst-dashed brc-red">2px dashed</div>
<div class="brw-1 brst-dotted brc-red">4px dotted</div>

Shorthand Values

When you want to define the full border in one class, write the pieces with underscores in place of spaces. Use hyphen syntax for Maple's variable-aware resolution, or use equal sign syntax when the value should be passed directly to CSS.

Pattern
Description
Example
Alias

Sets a default one-pixel solid border.

br
Composed

Combines alias and color utility as separate utilities.

br brc-primary
Shorthand

Defines width and style in a single border utility.

br-1_solid_red-500
Literal

Passes the complete border value directly to CSS.

br=1px_solid_black
Prefer Composition
In most interfaces, br brc-primary is easier to maintain than repeating a full border value. It lets you reuse the same border structure with different colors, states, and themes.

Directional Borders

Directional classes apply 1px solid only to the requested side or logical axis. Physical helpers target top, right, bottom, and left. Logical helpers target inline and block directions, which adapt to writing mode.

Utility
Property
Description
brt
border-top

Top border only.

brr
border-right

Right border only.

brb
border-bottom

Bottom border only.

brl
border-left

Left border only.

brx
border-inline

Inline start and end borders.

brxs
border-inline-start

Inline start border only.

brxe
border-inline-end

Inline end border only.

bry
border-block

Block start and end borders.

brys
border-block-start

Block start border only.

brye
border-block-end

Block end border only.

brt
brl brr
bry

<!-- Physical directions -->
<div class="brt brtc-red">Top border</div>
<div class="brb brbc-red">Bottom border</div>
<div class="brl brr brc-red">Left and right borders</div>

<!-- Logical directions -->
<div class="brx brc-red">Inline borders</div>
<div class="bry brc-red">Block borders</div>

Border Radius

The rad-* utility maps to border-radius. Numeric values use Maple's spacing scale, string values can resolve to radius variables, and rad-% creates a fully rounded shape.

rad-0
rad-2
rad-lg
rad-%

<div class="rad-0">No radius</div>
<div class="rad-4">Spacing-based radius</div>
<div class="--rad-lg=1.25rem rad-lg">Variable-based radius</div>
<div class="square-16 rad-%">Circle</div>

Corner Radius

Use the corner-specific radius utilities when only one corner should change. They follow the same value rules as rad-*.

Utility
Property
Example
brtlrad-*
border-top-left-radius
brtlrad-4
brtrrad-*
border-top-right-radius
brtrrad-4
brblrad-*
border-bottom-left-radius
brblrad-4
brbrrad-*
border-bottom-right-radius
brbrrad-4
top-left
top-right
bottom-left
bottom-right
left
right
top
bottom
⟍ diagonal
⟋ diagonal

<div class="brtlrad-4">top-left</div>
<div class="brtrrad-4">top-right</div>
<div class="brblrad-4">bottom-left</div>
<div class="brbrrad-4">bottom-right</div>

<div class="brtlrad-4 brblrad-4">left</div>
<div class="brtrrad-4 brbrrad-4">right</div>

<div class="brtlrad-4 brtrrad-4">top</div>
<div class="brblrad-4 brbrrad-4">bottom</div>

<div class="brtlrad-4 brbrrad-4">⟍ diagonal</div>
<div class="brtrrad-4 brblrad-4">⟋ diagonal</div>

Outline

Outline utilities mirror the border pattern but map to the CSS outline family. They are useful for focus states because outlines do not take up layout space, and oloff-* controls the distance from the element.


<!-- Complete outline shorthand with 1 px negative offset -->
<button class="ol-2px_solid_red -oloff-px">Outline</button>

<!-- Separate outline parts with 4px offset -->
<button class="olw-2px olst-dashed olc-red oloff-1">Dashed</button>

<!-- Focus state and -6px negative offset -->
<button class="-oloff-1.5 &:focus:ol-px_solid_red">Focus me</button>

Refer to the underlying CSS properties for granular border and outline control.

ESC

Start typing to search across the documentation.