Border utilities — width (border-{value}), radius (rounded-{value}), and color (border-{color}-{tone}), stackable on any element.

Example

html
<!-- Set border width, radius and color --> <engine:VisualElement class="border-8 rounded-lg border-red-400"/>

Border Width

Format: border-{value}

ClassProperties
border-0border-width: 0
border-1border-width: 1px
border-2border-width: 2px
border-4border-width: 4px
border-8border-width: 8px
border-12border-width: 12px
border-16border-width: 16px

Border Radius

Format: rounded-{value}

ClassProperties
rounded-noneborder-radius: 0
rounded-smborder-radius: 2px
roundedborder-radius: 4px
rounded-mdborder-radius: 6px
rounded-lgborder-radius: 8px
rounded-xlborder-radius: 12px
rounded-2xlborder-radius: 16px
rounded-3xlborder-radius: 24px
rounded-fullborder-radius: 9999px — square elements only, see below

⚠️ rounded-full is for squares (circles), never for pills. UI Toolkit resolves oversized radii by scaling them into an ellipse, unlike CSS browsers which clamp to a capsule. On a non-square element, 9999px — and 50% / 100%, they fail identically — renders curved sides instead of a pill. On a square all of them produce the same circle, so rounded-full is safe for avatars and icon buttons only.

Pill shapes

Format: rounded-pill-{height}

For a true capsule the radius must equal half the element's height, and USS has no unit for that — so the pill classes are named by the element height they fit:

ClassFor elements of heightProperties
rounded-pill-2424pxborder-radius: 12px
rounded-pill-3232pxborder-radius: 16px
rounded-pill-4040pxborder-radius: 20px
rounded-pill-4848pxborder-radius: 24px
rounded-pill-5656pxborder-radius: 28px
rounded-pill-6464pxborder-radius: 32px
rounded-pill-8080pxborder-radius: 40px
html
<!-- A 40px-tall capsule button --> <engine:Button class="h-40 rounded-pill-40 bg-primary-500" text="Play" />

For a height outside the ladder, author the radius explicitly: border-radius: <height / 2>px.

Border Color

Format: border-{color}-{tone}

html
<engine:VisualElement class="border-purple-700" /> <engine:VisualElement class="border-red-500" /> <engine:VisualElement class="border-red-500-half" />

The per-ramp border-color classes come from the Essentials theme's Colors/utility-colors.uss (or your own Palette Generator export). The -half suffix means the same tone at 50% opacity — a convention, not shipped by default; see Colors → The -half suffix for the alias to define it yourself.

See also

  • Colors — the --color-{name}-{tone} tokens the border-color classes route into
  • Theme Stack — where to place overrides so package updates don't eat them
  • Size · Layout · Text — the rest of the utility-class set

Settings

Theme

Light

Contrast

Material

Dark

Dim

Material Dark

System

Sidebar(Light & Contrast only)

Light
Dark

Font Family

DM Sans

Wix

Inclusive Sans

AR One Sans

Direction

LTR
RTL