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 · Overlays

Dialog and confirm

View .md

Stable

Dialogs interrupt to ask for a decision, usually to confirm something that cannot be undone. Use the native dialog element opened with showModal(), which handles focus and the Escape key for you.

Disconnect Rent Radar?

Rent Radar stops receiving updates. You can connect it again later.


Specifications

Anatomy

Disconnect Rent Radar?

Rent Radar stops receiving updates. You can connect it again later.

1) Title
h2, phrased as the question
2) Body
one or two sentences on what will happen
3) Actions
right-aligned
cancel first, then the action
action named for what it does

Size and spacing

Up to 28rem (448px) wide.

Container
max-width: 28rem /* 448px */
padding: var(--at-space-6) /* 24px */
border-radius: var(--at-radius-2) /* 10px */
Actions
margin-top: var(--at-space-5)
gap: var(--at-space-3)

Usage

When to use

  • Confirming a destructive or irreversible action.

When not to use

  • Forms or long content: use a page.
  • Information only: use an alert.
  • Inside another dialog.

Content

  • Title as a question: "Disconnect Rent Radar?"
  • Buttons say the action: "Disconnect", not "OK".

Do and don't

Delete 3 readings?

This cannot be undone.

DoA question, and an action button that names the action.

Are you sure?

Don'tVague title and Yes / No buttons.

Do

  • Title it as the question.
  • Name the action on the button: "Disconnect", not "OK".

Don't

  • Open a dialog from a dialog.

Implementation

HTML

<dialog class="at-dialog" open aria-labelledby="dlg-title">
  <h2 id="dlg-title">Disconnect Rent Radar?</h2>
  <p>Rent Radar stops receiving updates. You can connect it again later.</p>
  <div class="at-dialog__actions">
    <button type="button" class="at-button">Cancel</button>
    <button type="button" class="at-button at-button--danger">Disconnect</button>
  </div>
</dialog>

Classes

ClassWhat it does
at-dialogUse on a native dialog element; opened with showModal()
at-dialog__actionsRight-aligned buttons

Tokens used

--at-border, --at-surface-overlay, --at-text, --at-shadow-overlay


Accessibility

  • A native dialog with showModal() traps focus and closes on Escape.

Related