Typography
Type scale, role styles, and the utility classes that establish hierarchy across the Basel Standard docs and UI surfaces.
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.
| Token | Class | Size | Line height | Typical use |
|---|---|---|---|---|
| Micro | text-[10px] | 10px / 0.625rem | Contextual | Labels, table headers, compact metadata, and status rails. |
| Small | text-sm | 14px / 0.875rem | 1.75rem when paired with `leading-7` | Support copy, helper text, compact body rows, and muted description text. |
| Base | text-base | 16px / 1rem | 2rem when paired with `leading-8` | Default docs body copy and longer explanatory paragraphs. |
| Large | text-lg | 18px / 1.125rem | Contextual | Short lead lines, prominent panel text, and smaller display moments. |
| 2XL | text-2xl | 24px / 1.5rem | Contextual | Section titles, card titles, and medium display headings. |
| 3XL | text-3xl | 30px / 1.875rem | Contextual | Numerical emphasis, pricing figures, and high-contrast display accents. |
| 4XL | text-4xl | 36px / 2.25rem | Contextual | Docs page titles and major section headers. |
| 5XL | text-5xl | 48px / 3rem | Contextual | Marketing 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-foregroundUse for navigational labels, taxonomy, table labels, and supporting metadata.
Page title
text-4xl font-semibold uppercase tracking-[-0.05em]Primary docs page heading. Carries structure quickly without decorative treatment.
Section title
text-2xl font-semibold uppercase tracking-[-0.04em]Second-level section heading used throughout docs and showcase modules.
Subsection title
text-lg font-semibold uppercase tracking-[0.04em]Useful for grouped guidance, API sections, and compact panel headings.
Body copy
text-base leading-8 text-foregroundDefault explanatory prose for docs pages and longer descriptive text.
Compact body
text-sm leading-7 text-muted-foregroundSecondary paragraphs, support text, and denser interface descriptions.
Numeric emphasis
text-3xl font-semibold uppercase tracking-[-0.05em]Best for counts, stat values, and singular display accents inside panels.
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:
| Role | Typical use |
|---|---|
hero | dominant homepage and pricing statements |
display | article headers, section-leading editorial titles, account and utility page titles |
card | standard card headlines and compact authored modules |
panel | wider support panels, FAQ questions, and denser explanatory headers |
record | route headers, selected-record views, and operational detail surfaces |
fluid | cases 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 measure keeps the strongest poster break.
Display measure stays editorial without becoming too narrow.
Card measure is the default authored title width.
Panel measure gives support titles a little more room.
Record measure fits denser operational or selected-item labels.
Fluid measure lets the surrounding grid decide the width.
How To Choose A Role
- Use
herowhen the title is the main poster move on the page. - Use
displaywhen the heading should feel editorial but not theatrical. - Use
cardfor the default authored card silhouette. - Use
panelwhen the title reads more like a supporting sentence or needs a little more room. - Use
recordwhen the heading carries concrete nouns, workflow labels, or selected-item detail. - Use
fluidsparingly, 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.