On this page

Border

Borders separate and outline. Most are 1 px; a thicker line means selected, focused or a status to notice.

Borders draw the edges people rely on: where a field starts, where one card ends and another begins, where the keyboard is right now.

Most borders are 1 px. Thicker lines mean something: selected, focused, or a status to notice.

Border colours are colour tokens: color.border for dividers and cards, color.border.bold for the edges of inputs, checkboxes and selects. See Tokens.

The widths

  • border.width.default--bh-border-width-default1 pxInputs, secondary buttons, cards, tables and dividers.
  • border.width.selected--bh-border-width-selected2 pxThe bar under a selected tab or beside a selected side navigation item, and the edge of a selected card. Pair with color.border.selected.
  • border.width.focused--bh-border-width-focused2 pxThe focus ring. Pair with color.border.focus and state.focus.offset.
  • border.width.accent--bh-border-width-accent4 pxA status or emphasis bar on one edge: rows with an error, callouts and quotes. Pair with a status or brand border colour.

Examples

border.width.default · 1 px

Inputs, default buttons, cards, tables and dividers.

mystore.example.com
Online storeConnected · last sync 2 minutes ago

border.width.selected · 2 px

The bar under a selected tab, the bar beside a selected side navigation item, and the edge of a selected card. Always with color.border.selected.

OverviewMappingsHistory
Every 15 minutesSelected schedule
DashboardIntegrationsLogs

border.width.focused · 2 px

The focus ring, in color.border.focus, drawn 2 px outside the element (state.focus.offset). Draw it inside, at −2 px, when a box around the element would cut it off: menu items, table cells and tabs in a scroll area.

Test connection
Edit mappingPauseRun sync now

border.width.accent · 4 px

A status or emphasis bar on one edge: a table row with an error, callouts and quotes. Banners don’t use it; they use a tinted background (see Color usage). The box keeps its radius on all four corners and the bar follows the curve.

Before the first syncMap the order fields. Fields without a mapping are skipped.

Use one radius for every control.

10:42:07Order #10293Synced10:42:09Order #10294Failed10:42:11Order #10295Synced

Width and colour go together

Width Colour For
border.width.default color.border or color.border.bold Edges and dividers
border.width.selected color.border.selected Selected tab, side navigation item or card
border.width.focused color.border.focus Keyboard focus
border.width.accent color.border.danger, .warning, .success, .info or .brand Status and emphasis bars

Don’t show a state with colour alone. Selected and focused also change the width.

Do and don’t

Do
OverviewMappingsHistory

Mark the selected tab with a 2 px bar in the selected colour.

Don’t
OverviewMappingsHistory

Use the 4 px accent for a selected tab. Accent is for status and emphasis.

Do
Before the first syncMap the order fields.

Put the 4 px accent on one edge only.

Don’t
Before the first syncMap the order fields.

Draw 4 px all the way round. The box shouts and the message gets lost.

Do
Online storeConnected

Give cards a 1 px border. Selection adds the 2 px border.

Don’t
Online storeConnected

Give every card a 2 px border. Nothing can show selection any more.

Code

.callout {
  position: relative;
  overflow: hidden;
  border: var(--bh-border-width-default) solid var(--bh-color-border);
  border-radius: var(--bh-radius-100);
}
.callout::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bh-border-width-accent);
  background: var(--bh-color-border-danger);
}
:focus-visible {
  outline: var(--bh-border-width-focused) solid var(--bh-color-border-focus);
  outline-offset: var(--bh-state-focus-offset);
}

Tokens

TokenValueDescription
--bh-border-width-default1px1 px. Inputs, secondary buttons, cards, tables and dividers.
--bh-border-width-selected2px2 px. The bar under a selected tab or beside a selected side navigation item, and the edge of a selected card. Pair with color.border.selected.
--bh-border-width-focused2px2 px. The focus ring. Pair with color.border.focus and state.focus.offset.
--bh-border-width-accent4px4 px. A status or emphasis bar on one edge: rows with an error, callouts and quotes. Pair with a status or brand border colour.