@ai-created/ui
All guidelines
Guideline 01Canonical

Foundations

The visual, spatial, typographic, motion, media, and accessible accent-scheme decisions that every AI-Created interface inherits.

Owner
Design Systems
Last reviewed
August 2026
Review cadence
Quarterly and before any token release
Source of truth
styles/tokens.css and tailwind-preset.js

Required outcomes

01

A product can switch themes and accent schemes without local color overrides.

02

Design decisions map to named semantic tokens before component styling.

03

Layouts remain readable from 320px through the 1400px container maximum.

01

Token architecture

Use a three-level naming model so raw values can change without altering product intent.

Decision hierarchy

LevelExampleWho uses itRule
Reference--ref-red-500System maintainersStores a raw value. Never use directly in product UI.
Semantic--color-action-primaryDesigners and engineersNames intent and owns light and dark mode behavior.
ComponentButton / Primary / BackgroundComponent authorsMaps a component decision to a semantic token.

Token rules

01

Name the purpose

A token should explain why the value exists, not what its current hex value resembles.

02

Change every scheme together

Every accent role is tuned and reviewed across all nine schemes and light/dark mode, including focus and selection; feedback semantics remain stable.

03

Avoid product aliases

Do not create a new token for one screen. Promote a value only after a repeated semantic need is demonstrated.

04

Keep compatibility aliases secondary

Existing red aliases remain supported public contracts. New work can prefer accent and action names when intent is unambiguous.

02

Color and contrast

Accent schemes, committed actions, destructive actions, neutral surfaces, and semantic feedback each have an explicit role.

Core semantic palette

Samples resolve live through the current theme.

Background

--color-bg

Page background and highest-level negative space.

Surface

--color-surface

Cards, panels, fields, and floating regions.

Surface 2

--color-surface2

Controls, inset regions, and subtle grouping.

Text

--color-text

Headings, labels, and critical information.

Accent

--color-accent

Links, emphasis, and non-destructive branded actions.

Action primary

--color-action-primary

High-emphasis action fill.

Action destructive

--color-action-destructive

Destructive action fill, distinct from ordinary commitment.

Control border

--color-control-border

Contrast-safe boundaries for inputs and outlined controls.

Success

--color-success

Completed or healthy outcomes only.

Warning

--color-warning

Recoverable risk or pending attention.

Info

--color-info

Contextual or process information.

Error

--color-error

Invalid input, failed operations, and destructive risk.

Color acceptance

Required

  • Body text meets 4.5:1 contrast.
  • Large text and icons conveying meaning meet 3:1 contrast.
  • Focus indicators meet 3:1 against adjacent colors.
  • Meaning never relies on color alone.

Avoid

  • Raw reference colors in product code.
  • Accent decoration competing with primary actions.
  • Tinted text on tinted surfaces without contrast validation.
  • Theme-specific assets without a paired alternative.
  • Letting accent schemes change destructive or feedback meanings.
03

Typography, spacing, and grid

Instrument Serif creates editorial moments. Space Grotesk carries every functional reading task.

Type roles

RoleFamilyTypical sizeUse
Display / HeroInstrument Serif60 to 96pxOne primary narrative statement per page.
Display / SectionInstrument Serif40 to 60pxMajor chapter introductions.
HeadingSpace Grotesk 50020 to 32pxFunctional page and card hierarchy.
BodySpace Grotesk 40014 to 20pxInstructions, descriptions, and long-form content.
MetadataSystem mono10 to 12pxTokens, statuses, keyboard keys, and code-adjacent labels.

Responsive layout contract

RangeGutterColumnsBehavior
320 to 767px6vw4Stack content, preserve source order, use full-width controls when needed.
768 to 1023px2vw8Introduce split regions only when each column remains readable.
1024 to 1399px2vw12Enable persistent secondary navigation and dense matrices.
1400px and above2vw12Cap primary content at 1400px and grow outer whitespace.

Composition rules

01

Use a 4px base unit

Tokenized radii and intentional optical adjustments may differ, but layout spacing should resolve to the base unit.

02

Prefer gap over margins

Parent layout owns relationships between siblings. Components own only their internal spacing.

03

Keep reading measures controlled

Body copy should usually remain between 45 and 75 characters per line.

04

Preserve hierarchy when stacking

Responsive changes may alter layout, never the semantic or focus order.

04

Shape, elevation, motion, icons, and media

Secondary visual systems remain restrained so content and interaction state stay primary.

System inventory

AreaContractCurrent support
Radius4px small, 6px default, 10px large, full for pillsCanonical tokens
ElevationBorder first; shadow only when depth changes interaction meaningLocal Tailwind effects, not yet canonical tokens
Motion200ms feedback, 300ms transitions, 500ms entrancesCanonical duration tokens and shared helpers
IconsLucide, 16px inline, 20px controls, 32px empty statesCode dependency; no separate icon package
ImageryTheme-paired, art-directed, useful at crop extremesThemedHeroImage plus product-owned assets
Data visualizationText, shape, and pattern reinforce colorGuidance only; no chart primitive yet

Media and motion acceptance

Motion

  • Animate opacity and transforms when possible.
  • Respect prefers-reduced-motion.
  • Keep focus and reading order stable during transitions.
  • Use motion to explain state or hierarchy, never as idle decoration.

Media

  • Provide useful alt text or mark decorative media as empty alt.
  • Test both theme sources and missing-image fallbacks.
  • Preserve the subject at mobile and wide crops.
  • Include captions or transcripts for time-based media.