Typography

Type scale, role styles, and the utility classes that establish hierarchy across the Basel Standard docs and UI surfaces.

LLM handoff

Copy a concise page brief or the full MDX source without digging through the docs shell.

Typography carries structure before decoration. In this system, sizes stay restrained and the hierarchy comes from a few repeated combinations: uppercase labels, compact section heads, and generous body measure.

Font Family

The shared UI family is exposed through font-sans. That class resolves to var(--font-sans), which is set by the current marketing font selection and falls back to Helvetica Neue and Arial.

Type Scale

Use the size utilities below as a stable scale. They are the classes already appearing across docs, previews, and marketing specimens.

Family

The shared UI family is exposed through font-sans, which resolves to var(--font-sans). By default that variable points at the current marketing font selection, then falls back to Helvetica Neue and Arial.

Scale

These are the text sizes actively used across docs, marketing, and component examples.

TokenClassSizeLine heightTypical use
Microtext-[10px]10px / 0.625remContextualLabels, table headers, compact metadata, and status rails.
Smalltext-sm14px / 0.875rem1.75rem when paired with `leading-7`Support copy, helper text, compact body rows, and muted description text.
Basetext-base16px / 1rem2rem when paired with `leading-8`Default docs body copy and longer explanatory paragraphs.
Largetext-lg18px / 1.125remContextualShort lead lines, prominent panel text, and smaller display moments.
2XLtext-2xl24px / 1.5remContextualSection titles, card titles, and medium display headings.
3XLtext-3xl30px / 1.875remContextualNumerical emphasis, pricing figures, and high-contrast display accents.
4XLtext-4xl36px / 2.25remContextualDocs page titles and major section headers.
5XLtext-5xl48px / 3remContextualMarketing hero headings and large specimen moments.

Role Styles

Size alone does not define the system. Case, tracking, and weight establish the real hierarchy.

Micro label

text-[10px] font-semibold uppercase tracking-[0.22em] text-muted-foreground

Use for navigational labels, taxonomy, table labels, and supporting metadata.

System Label / 07

Page title

text-4xl font-semibold uppercase tracking-[-0.05em]

Primary docs page heading. Carries structure quickly without decorative treatment.

Foundations

Section title

text-2xl font-semibold uppercase tracking-[-0.04em]

Second-level section heading used throughout docs and showcase modules.

Type Scale

Subsection title

text-lg font-semibold uppercase tracking-[0.04em]

Useful for grouped guidance, API sections, and compact panel headings.

Recommended Pairing

Body copy

text-base leading-8 text-foreground

Default explanatory prose for docs pages and longer descriptive text.

Typography carries the reading order before borders, color, or motion need to intervene.

Compact body

text-sm leading-7 text-muted-foreground

Secondary paragraphs, support text, and denser interface descriptions.

Use this for helper copy, descriptions, and secondary detail that should stay legible but quieter.

Numeric emphasis

text-3xl font-semibold uppercase tracking-[-0.05em]

Best for counts, stat values, and singular display accents inside panels.

128

Title Measure

Title width is controlled separately from text size. That gives the system more variety without losing rhythm.

Use the shared title-measure roles when a heading needs to feel tighter, wider, or more record-like:

RoleTypical use
herodominant homepage and pricing statements
displayarticle headers, section-leading editorial titles, account and utility page titles
cardstandard card headlines and compact authored modules
panelwider support panels, FAQ questions, and denser explanatory headers
recordroute headers, selected-record views, and operational detail surfaces
fluidcases where the layout should decide width instead of the title cap

The default goal is simple: constrain measure by role, not by habit.

Preferred Controls

Use the measure props on the shared primitives first:

<SectionHeading
  eyebrow="Interactive demo"
  title="See the system under load."
  measure="display"
/>

<CardTitle measure="panel">Pricing decisions, stated clearly.</CardTitle>

<ProseTitle measure="display">
  Product writing can match the interface.
</ProseTitle>

For route-specific headings or blocks that do not use those primitives, use the shared helper instead of introducing a new one-off width:

import { getTitleMeasureClassName } from "@/lib/title-measure"
import { cn } from "@/lib/utils"

<h2
  className={cn(
    "text-3xl font-semibold uppercase tracking-[-0.04em]",
    getTitleMeasureClassName("panel")
  )}
>
  What ships is visible.
</h2>

Rendered Measure Comparison

This stack uses the same heading content with different measure roles so the line breaks are easy to compare at a glance.

hero
Structured title measure across authored product surfaces.

Hero measure keeps the strongest poster break.

display
Structured title measure across authored product surfaces.

Display measure stays editorial without becoming too narrow.

card
Structured title measure across authored product surfaces.

Card measure is the default authored title width.

panel
Structured title measure across authored product surfaces.

Panel measure gives support titles a little more room.

record
Structured title measure across authored product surfaces.

Record measure fits denser operational or selected-item labels.

fluid
Structured title measure across authored product surfaces.

Fluid measure lets the surrounding grid decide the width.

How To Choose A Role

  • Use hero when the title is the main poster move on the page.
  • Use display when the heading should feel editorial but not theatrical.
  • Use card for the default authored card silhouette.
  • Use panel when the title reads more like a supporting sentence or needs a little more room.
  • Use record when the heading carries concrete nouns, workflow labels, or selected-item detail.
  • Use fluid sparingly, usually when the grid already sets the right measure.

Guidance

Prefer Roles Over Raw Sizing

Do not choose a text size in isolation. The Swiss character comes from the full combination of size, weight, case, and tracking.

Do not choose title width in isolation either. Prefer the shared measure roles before reaching for a local max-w-[Nch] cap.

Vary Title Measure By Job

Not every heading should resolve to the same narrow poster width.

  • Let editorial and hero moments stay tighter.
  • Give FAQ, support, and utility titles more room.
  • Let record-led surfaces read like product UI instead of miniature billboards.

Keep Body Copy Calm

Default explanatory copy should usually stay at text-base leading-8. Move down to text-sm leading-7 when the copy is secondary or the surface is denser.

Use Uppercase With Intent

Uppercase labels work well for navigation, section markers, and compact metadata. They lose force when applied to long sentences or large blocks of body text.

Let Display Type Stay Rare

text-4xl and text-5xl are for page titles and hero moments. Most product surfaces should rely on the smaller section and body roles.