Type Scale

A modular type scale, computed and shown as a specimen sheet. Declare a base size and a musical ratio (minor second through golden ratio) and the atom calculates every step -- px and rem to the hundredth, computed with the same integer-safe arithmetic on every renderer -- and sets the sample line at each size with a proportion bar, plus a ready-to-paste block of CSS custom properties. Calcs baked in, the way wall_elevation bakes in wall maths: an agent declares intent (base, ratio, steps), the atom does the typography. Light or dark, no JavaScript.

Surfaces
webgoogle-meet-stagegoogle-apps-script-webmcp-appspdfandroid
Degraded on
SurfaceNote
google-chatRenders as a plain text card; the typographic layout is lost
Live preview
type scale
Major third 1.25
base 16px · 9 steps
+6
The quick brown fox
61.04px / 3.815rem
+5
The quick brown fox
48.83px / 3.052rem
+4
The quick brown fox
39.06px / 2.441rem
+3
The quick brown fox
31.25px / 1.953rem
+2
The quick brown fox
25.00px / 1.563rem
+1
The quick brown fox
20.00px / 1.250rem
0
The quick brown fox
16.00px / 1.000rem
-1
The quick brown fox
12.80px / 0.800rem
-2
The quick brown fox
10.24px / 0.640rem
:root {
  --step-6: 3.815rem; /* 61.04px */
  --step-5: 3.052rem; /* 48.83px */
  --step-4: 2.441rem; /* 39.06px */
  --step-3: 1.953rem; /* 31.25px */
  --step-2: 1.563rem; /* 25.00px */
  --step-1: 1.250rem; /* 20.00px */
  --step-0: 1.000rem; /* 16.00px */
  --step-n1: 0.800rem; /* 12.80px */
  --step-n2: 0.640rem; /* 10.24px */
}
Fields
FieldTypeRequired
baseinteger. Base size in px, clamped 10-32. Default 16.optional
ratio"minor_second" | "major_second" | "minor_third" | "major_third" | "perfect_fourth" | "augmented_fourth" | "perfect_fifth" | "golden" (optional, default "major_third")optional
steps_upinteger. Steps above the base, clamped 1-8. Default 6.optional
steps_downinteger. Steps below the base, clamped 0-3. Default 2.optional
samplestring. Sample line set at each size. Default "The quick brown fox".optional
voice"display" | "serif" | "mono" (optional, default "display")optional
theme"dark" | "light" (optional, default "light")optional
accent"#rrggbb". Default "#0e7bb8".optional
show_codebool. Append the CSS custom properties block. Default true.optional
Example payload
{
  "type": "type_scale"
}
ARD catalog entry
{
  "identifier": "urn:air:a2uicatalog.ai:atom:type_scale",
  "displayName": "Type Scale",
  "type": "application/vnd.a2ui.atom+json",
  "url": "https://a2uicatalog.ai/atoms/type_scale",
  "capabilities": [
    "web",
    "google-meet-stage",
    "google-apps-script-web",
    "mcp-apps",
    "pdf",
    "android"
  ],
  "description": "A modular type scale, computed and shown as a specimen sheet. Declare a base size and a musical ratio (minor second through golden ratio) and the atom calculates every step -- px and rem to the hundredth, computed with the same integer-safe arithmetic on every renderer -- and sets the sample line at each size with a proportion bar, plus a ready-to-paste block of CSS custom properties. Calcs baked in, the way wall_elevation bakes in wall maths: an agent declares intent (base, ratio, steps), the atom does the typography. Light or dark, no JavaScript.",
  "representativeQueries": [
    "show a computed modular type scale as a specimen sheet with CSS custom properties",
    "a modular type scale, computed and shown as a specimen sheet. declare a base size and a musical rati",
    "render a type scale"
  ]
}
← Full ARD catalog
Deploy your own Google Apps Script renderer

The renderer is an open-source Google Apps Script web app. Deploy your own instance in 4 commands — you own the URL, no dependency on the demo endpoint.

git clone https://github.com/a2uicatalog/a2ui
cd a2ui/apps-script-surface/gas-wired-renderer
clasp push && clasp deploy
Full deploy guide →