Skip to content
AI Building

Build an Atrium app with AI

One minimised file with everything an AI tool needs: how to work, the hard rules, the full app contract and the design system. Upload it to any LLM, then describe your app.

ATRIUM-AI-BUILD.mdMarkdown
  1. Upload the file to ChatGPT, Claude, Cursor or any AI tool (or paste its contents).
  2. Describe the app you want in plain English.
  3. Let the AI ask you for the API key when it needs one.
View the file
Auto

Component · Layout

Stack and inline

View .md

Stable

Two helpers space things consistently so you do not need your own margins. Stack puts items in a column with even gaps. Inline puts items in a row and wraps them onto the next line when space runs out, which matters in narrow quick views.

First
Second

Specifications

Anatomy

First
Second
1) Stack (.at-stack)
display: flex
flex-direction: column
gap: var(--at-space-5) /* 16px */
2) Inline (.at-inline)
display: flex
flex-wrap: wrap
align-items: center
gap: var(--at-space-3) /* 8px */

Size and spacing

8px gap
8px gap
Stack
.at-stack gap: var(--at-space-5) /* 16px */
.at-stack--tight gap: var(--at-space-3) /* 8px */
Inline
gap: var(--at-space-3) /* 8px */
.at-inline--end: justify-content: flex-end
.at-inline--between: justify-content: space-between

Stack

Sections, cards and fields down the page. 16px between items.

Example

Section one
Section two

Tight stack

Closely related items, such as lines of a loading skeleton or a short list. 8px between items.

Example

Item
Item

Inline, end

Buttons at the end of a form or card, main action last.

Example

Inline, between

Two things pushed to opposite ends, such as a label and a value or a count and an action.

Example

3 selected

Usage

When to use

  • Spacing any group of items: use these instead of margins.
  • Rows of buttons or tags that must wrap in narrow views.

When not to use

  • Rows of data with columns: use a table.
  • Key and value pairs: use a summary list.

Do and don't

DoInline handles the gap and wraps on small screens.
Don'tHand-set margins that do not match the scale.

Do

  • Put the primary button last in a button row.

Don't

  • Mix your own margins with stack gaps.

Implementation

HTML

<div class="at-stack">
  <div class="at-card">First</div>
  <div class="at-card">Second</div>
  <div class="at-inline at-inline--end">
    <button type="button" class="at-button">Cancel</button>
    <button type="button" class="at-button at-button--primary">Save</button>
  </div>
</div>

Classes

ClassWhat it does
at-stackColumn with 16px gaps
at-stack--tightColumn with 8px gaps
at-inlineWrapping row with 8px gaps
at-inline--endRight-aligned row
at-inline--betweenSpace between items

Tokens used


Accessibility

  • Keep DOM order the same as visual order.

Related