Skip to content
Fleetline

Box

Usage

Use Box when you need a padded, optionally bordered surface and no richer component fits — a summary panel, a group of fields, a placeholder slot. It exposes only token steps, so apps never invent a 13px padding or a one-off grey.

Anatomy

  1. Container — .box (any element: div, section, li)
  2. Padding — .box--pad-{2|3|4|6|8}
  3. Surface — .box--surface | -subtle | -sunken | -raised
  4. Border and radius — .box--bordered, .box--radius-{md|lg}

Examples

Box

Next service

Truck HT-507 · 12 Nov · Oil and filter change

3 vehicles are due for inspection this week.

Drop a photo of the damage here, or attach it from the work order.

Van KX-219

In workshop · Bay 4

pad-2
pad-3
pad-4
pad-6
pad-8
<div class="box box--pad-4 box--bordered box--radius-md">
  <p class="text-overline">Next service</p>
  <p class="text-body">Truck HT-507 · 12 Nov · Oil and filter change</p>
</div>

<div class="box box--pad-6 box--surface-raised box--radius-lg">…</div>

API

HookValuesPurpose
.boxblock classBlock container with no margin
.box--pad-2 | -3 | -4 | -6 | -8modifier classPadding from --space-*
.box--surface | -surface-subtle | -surface-sunken | -surface-raisedmodifier classBackground (raised adds elevation shadow)
.box--borderedmodifier class1px default border
.box--radius-md | -lgmodifier classCorner radius (md = Fleetline's 8px shape)
--box-padding, --box-radiuscustom propertyOverride with another token, never a raw value

Do and don't

Bay 4 · 2 vehicles waiting

Do combine token modifiers instead of writing new CSS.

Bay 4

Don't nest raised boxes; stacked shadows read as clutter.

Accessibility

Tokens

Custom propertyPurpose
--space-2 | -3 | -4 | -6 | -8Padding steps
--color-bg-surface | -subtle, --color-elevation-surface-sunken | -raisedSurfaces
--elevation-raisedRaised shadow
--color-border-default, --border-width-thinBorder
--radius-md | -lgRadius