Foundations · Typography
Typography
The typefaces, weights and colors that give every heading and line of body copy the same voice, however the page was generated.
Font families
Primary is used for every heading; Secondary is used for supporting/body text. Upload your own font file, or browse a curated list by category.
Sans-serif fits mobile apps, web apps and dense UI best; Serif/Display suit editorial or marketing-led desktop sites; Monospace suits code-heavy tools; Handwritten suits playful or informal contexts.
Aa Bb Cc 123
The quick brown fox jumps over the lazy dog.
Sans-serif fits mobile apps, web apps and dense UI best; Serif/Display suit editorial or marketing-led desktop sites; Monospace suits code-heavy tools; Handwritten suits playful or informal contexts.
Aa Bb Cc 123
The quick brown fox jumps over the lazy dog.
{}
Type scale
Family comes from Primary (headings) or Secondary (supporting text) above - set the weight, style and color for each level to match your brand guideline. Each level carries its own Light and Dark color - Dark starts auto-generated from Light and stays in sync until you edit it directly; "Regenerate dark colors" below resets any you've customized back to that suggestion.
Caption defaults to 11 px for helper labels, metadata and contrast descriptions. Responsive typography: H1–H6, Body, Paragraph and Caption now apply their exact selected metrics across all pages through Foundation tokens. Small screens wrap headings and stack controls without replacing the chosen sizes. Rem mode respects the browser's root font size; the default conversion uses 16 px. Viewport breakpoints stay fixed so changing typography cannot move the layout thresholds. Per-breakpoint type overrides remain a future capability that would need its own explicit controls.
Tabular figures: Table's cells and Statistic's headline value both use tabular (fixed-width) digits, so a column of numbers lines up instead of drifting as digit shapes vary - reserved for actual numeric data, not applied to running body text.
H1-H6 here are visual sizes, not an HTML heading-rank mandate: pick whichever level's size reads right for a given piece of text, then choose its actual <h1>-<h6> tag from the page's own real document structure (one visible <h1> per page, ranks nested without skipping) - the two are independent decisions. A page's main heading might need H3's smaller size while still correctly being marked up as the page's one real <h1>; a visually prominent H1-styled pull-quote is still just a <p> or <blockquote>, not a second page heading.
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Running text
Body and Paragraph share the same default size, weight and color on purpose: they're the same visual style, distinguished by where each applies, not by how either looks. Use Body for a single line or short run of supporting text outside a real <p> (a card's description line, a table cell, a button's helper text); use Paragraph specifically for actual <p>-tagged prose, so a page with several paragraphs of running text still gets real paragraph markup (and whatever margin/spacing between them that implies) rather than a string of unrelated one-off text elements. Customize either independently if a real need ever calls for it - staying identical is the default, not a constraint.
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
State colors
These 7 rows (Active/Selected/Disabled/Error/Warning/Success/Info) aren't peers of H1-H6/Body/Paragraph/Caption above in a hierarchy - they're a different axis entirely: a color modifier meant to apply on top of whatever role's own size/weight is already in use (a nav link using Caption's size, recolored when Active; a form label using Body's size, recolored when Disabled). Every one of them ships at the same default size and line height (Text SM, 143%) specifically so changing state never changes layout - size/weight/line-height/italic controls are still here for real edge cases, but the default, recommended pattern is to leave them alone and change color only; independently resizing one breaks visual consistency with whatever base role it's actually modifying.
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
Aa Bb Cc - the quick brown fox jumps over the lazy dog
Light theme
Dark theme
{}
Additional semantic levels
Six more text roles that don't need their own row above - each already has a real, consistent value in use sitewide, referenced here rather than re-declared as a new editable level.
AI Rule
Generated interfaces must take every font size, weight and line-height from this page's Type Scale (or the Additional semantic levels above) - never an arbitrary value, and never a size interpolated between two scale steps to arrive at a novel one.
{}
For developers and AI agents: Markdown export and implementation contract
Typography tokens - Markdown export
A Markdown snapshot of Font families and every Type scale row above - regenerates live as you edit, so it's always in sync. Copy it straight into your design system docs or hand it to an AI/agent workflow.
Implementation contract
Saved validated choices override project recommendations, which override system defaults. This implementation contract governs static specimens. Resolved tokens in the current export are authoritative values. Component exceptions must name the affected role and reason.
Roles
Default heading sizes are H1 32px (2rem), H2 28px (1.75rem), H3 24px (1.5rem), H4 20px (1.25rem), H5 18px (1.125rem), H6 16px (1rem). Each role resolves family, size, weight, line height, tracking, style and color. Use semantic HTML for document hierarchy independently of visual size. Body and Paragraph default to 16px and Caption to 11px. Larger display sizes remain explicit custom choices.
State modifiers
Active, Selected, Disabled, Error, Warning, Success and Info are color modifiers. A state must inherit its base role's metrics to avoid layout movement. Independent state metrics in the editor are explicit specimen overrides and must not be applied as a universal state typography recipe. Use the state color token over the original role.
Component role mapping
Buttons, form labels, table cells and link text inherit Body metrics; dense metadata uses Caption; a form's helper or error text keeps the underlying label/body size and adds its state color. Eyebrows may use Caption with approved case; code uses the monospace family with Body dimensions. HTML headings preserve hierarchy even when a visual role differs. Default enabled text colors pass 4.5:1 on default page/panel/raised surfaces; saved custom text/surface colors require a new pair check.
Responsive usage
Saved roles apply consistently across widths. Optional product-specific fluid headings use clamp(1.5rem, 2vw + 1rem, 3rem) for H1, with explicit exported min/max. Body and paragraph stay readable at 1rem; do not automatically shrink text to fit. Caption remains the user-requested 11px role. Content wraps and 200% zoom remains supported. Platform presets seed values; edited presets become custom.
Fonts and recovery
Load actual faces and required weights, not only a successful stylesheet. Files are WOFF/WOFF2/TTF/OTF up to 2MB. Include uploaded data and remote stylesheet dependencies in the Foundation JSON. Stale completion cannot overwrite a newer selection or reset. Preserve the last valid font on failure and show a category-appropriate fallback.
Validation and examples
Line height is 50–300%, tracking -5–20px and weight 100–900. Blank tracking is invalid. Validate full hex before applying. Check text on the actual panel and error/tint surface. Exercise German expansion, Arabic RTL and Japanese wrapping, plus user line/word/letter-spacing overrides.
Preset changes and handoff
Project Setup seeds the initial platform preset when no Typography override is saved. A saved scale is retained across project edits. Review role sizes before Save foundation; Edit foundation unlocks saved settings. Export all semantic roles, metrics, responsive policy, fonts and px/rem equivalents.
Save and edit
Selections preview immediately. Save foundation commits valid settings in this browser and locks the editor. Select Edit foundation to revise saved settings; Cancel retains the saved settings. Storage failure keeps the draft editable.
Machine contract: section rules, storage, units and acceptance
{
"schemaVersion": 1,
"authority": "Saved validated choices override project recommendations, which override system defaults. This implementation contract governs static specimens. Resolved tokens in the current export are authoritative values. Component exceptions must name the affected role and reason.",
"governance": {
"owners": "Design System Lead owns token and compatibility policy. Designers own specimens and interaction contracts. Developers own resolver/export/import parity. QA and Accessibility own release evidence. Product teams own domain-specific confidence, privacy and retention policies.",
"changes": "Change the JSON contract first, regenerate documentation/defaults/catalog/tokens, then run model, DOM and recipient checks. Link the changed finding IDs and evidence in the release review.",
"compatibility": "Keep hue-named CSS tokens as compatibility aliases while semantic consumers migrate. Additive tokens retain schemaVersion 1. A removed/renamed key or changed stored meaning requires a schema migration, a version bump and a documented replacement before release. Keep the prior reader fixture until the migration is verified.",
"deprecation": "Record old key, replacement, reason, introduced version, planned removal version and affected consumers. Do not remove a token while an active consumer still uses it. Future records are preserved rather than coerced.",
"scope": "This is a web design system with one shared workspace profile. Native dp/sp adaptation and real agent execution require separate adapters and acceptance. User-defined colors and responsive exceptions require product-specific rendered verification."
},
"storage": {
"version": 1,
"legacy": "Unversioned valid records migrate in memory. Typography headingScaleVersion 2 applies the smaller six-heading scale once to older records, retaining other roles and existing font/color/style metrics. Later custom size edits are retained. Unsupported future records are preserved. The next successful write stamps the migrated version.",
"future": "Reject unsupported future versions. Preserve raw data. Offer backup and explicit reset.",
"invalid": "Foundation selections preview locally until Save foundation succeeds. Saved Foundation editors require Edit foundation before changes. Cancel discards the preview. Invalid drafts never replace saved records; storage failures retain the editable preview and the last durable record.",
"concurrency": "A storage event refreshes applied tokens and disables stale editor controls until reload. Never merge simultaneous edits silently."
},
"units": {
"base": "1rem = 16px at default browser settings. Do not fix the root font size.",
"use": "Prefer rem for typography, spacing and control dimensions. Hairline borders and viewport thresholds may use px. Both equivalents appear in Markdown. SVG strokes use viewBox units. Ratios, percentages, columns, timing and weights are unitless or retain their own units.",
"native": "Web CSS px/rem are not native dp/sp. A native adapter must map semantic roles, support text scaling and test device density. Native rendering is not shipped by this web library."
},
"acceptance": [
"Compare page, applied tokens, durable record, Machine View and exported instructions.",
"Test valid, unfinished, invalid, missing, malformed, legacy and future records. Exercise storage failure, reset, reload and another tab.",
"Test 320, 375, 768, 1024 and 1440px widths, 200% zoom, text-spacing overrides, RTL and long/localized labels.",
"Use keyboard and screen reader. Confirm focus return, names, values, error associations and status announcements.",
"Verify actual rendered text/surface pairs, forced colors, reduced motion, print and exported recipes in a recipient fixture. Source or DOM checks alone are not rendered acceptance."
],
"layers": {
"content": 0,
"sticky": 20,
"popover": 40,
"scrim": 60,
"dialog": 70,
"toast": 80,
"tooltip": 90,
"rules": "Each overlay gets an explicit owner and close/focus-return path. Portal menus out of clipped scroll containers. Nested dialogs stack one scrim per modal owner. Escape closes the top dismissible layer. Tooltips never block actions. Test collision and zoom; do not infer stacking order from shadow size."
},
"section": {
"title": "Typography",
"rules": {
"Roles": "Default heading sizes are H1 32px (2rem), H2 28px (1.75rem), H3 24px (1.5rem), H4 20px (1.25rem), H5 18px (1.125rem), H6 16px (1rem). Each role resolves family, size, weight, line height, tracking, style and color. Use semantic HTML for document hierarchy independently of visual size. Body and Paragraph default to 16px and Caption to 11px. Larger display sizes remain explicit custom choices.",
"State modifiers": "Active, Selected, Disabled, Error, Warning, Success and Info are color modifiers. A state must inherit its base role's metrics to avoid layout movement. Independent state metrics in the editor are explicit specimen overrides and must not be applied as a universal state typography recipe. Use the state color token over the original role.",
"Component role mapping": "Buttons, form labels, table cells and link text inherit Body metrics; dense metadata uses Caption; a form's helper or error text keeps the underlying label/body size and adds its state color. Eyebrows may use Caption with approved case; code uses the monospace family with Body dimensions. HTML headings preserve hierarchy even when a visual role differs. Default enabled text colors pass 4.5:1 on default page/panel/raised surfaces; saved custom text/surface colors require a new pair check.",
"Responsive usage": "Saved roles apply consistently across widths. Optional product-specific fluid headings use clamp(1.5rem, 2vw + 1rem, 3rem) for H1, with explicit exported min/max. Body and paragraph stay readable at 1rem; do not automatically shrink text to fit. Caption remains the user-requested 11px role. Content wraps and 200% zoom remains supported. Platform presets seed values; edited presets become custom.",
"Fonts and recovery": "Load actual faces and required weights, not only a successful stylesheet. Files are WOFF/WOFF2/TTF/OTF up to 2MB. Include uploaded data and remote stylesheet dependencies in the Foundation JSON. Stale completion cannot overwrite a newer selection or reset. Preserve the last valid font on failure and show a category-appropriate fallback.",
"Validation and examples": "Line height is 50\u2013300%, tracking -5\u201320px and weight 100\u2013900. Blank tracking is invalid. Validate full hex before applying. Check text on the actual panel and error/tint surface. Exercise German expansion, Arabic RTL and Japanese wrapping, plus user line/word/letter-spacing overrides.",
"Preset changes and handoff": "Project Setup seeds the initial platform preset when no Typography override is saved. A saved scale is retained across project edits. Review role sizes before Save foundation; Edit foundation unlocks saved settings. Export all semantic roles, metrics, responsive policy, fonts and px/rem equivalents.",
"Save and edit": "Selections preview immediately. Save foundation commits valid settings in this browser and locks the editor. Select Edit foundation to revise saved settings; Cancel retains the saved settings. Storage failure keeps the draft editable."
}
}
}