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

Stack

A vertical flow with a gap from the space scale. The one way to space things above each other.

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
  • Fields in a form, sections of a card, items of a list.
  • Any column whose gaps come from the scale.
Not for

02

Anatomy

  1. 1stack<div>The column: data-gap, data-align.
  2. 2box<div>A child: the gap is between, never around.

03

Do and don't

One gap per stack
DoSiblings of one kind, one gap: nest a Stack for a group.
Don'tSpacer divs for the odd gap: the scale breaks.

04

Content

  • A Stack has no words of its own.
  • As a list, name it if a heading doesn't: aria-label.
Next — StackAPI