Skip to main content
  1. Docs
  2. Components
  3. Layout

Box

A token-only surface: padding, a background, a border and corners. No margin: space between siblings is the parent's gap.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<div>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • A panel with a tint, a border or corners.
  • Padding around a region, from the tokens.
Not for
  • Related content with a titleCard
  • Space between siblingsStack

02

Anatomy

  1. 1box<div>The surface: padding, background, border, corners.

03

Do and don't

Gaps, not margins
DoThe parent's gap spaces the boxes.
Don'tA margin on each box: the spacing drifts, and doubles at the edges.

04

Content

  • A Box has no words of its own: name it with render and aria-label if it's a landmark.
  • Tokens only: no colour or size outside the scales.
Next — BoxAPI