apps/eclipse/content/design-system/tokens/typography.mdx
The Eclipse Design System provides utility classes for consistent typography across four categories: Titles, Headings, Text, and Code. Each maps to specific font families, sizes, weights, and line heights defined as design tokens.
Title styles use the Mona Sans VF display font with heavy weights and extended widths for maximum visual impact. Use these for hero sections, page titles, and marketing content.
<div className="not-prose my-8 space-y-6"> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-title-5xl · 64px/72px · weight 900 · width 125</p> <p className="type-title-5xl">The quick brown fox</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-title-4xl · 40px/48px · weight 900 · width 125</p> <p className="type-title-4xl">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-title-3xl · 30px/36px · weight 900 · width 125</p> <p className="type-title-3xl">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-title-xl · 20px/28px · weight 800 · width 110</p> <p className="type-title-xl">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-title-lg · 18px/28px · weight 800 · width 110</p> <p className="type-title-lg">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-title-md · 16px/24px · weight 800 · width 110</p> <p className="type-title-md">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-title-sm · 14px/20px · weight 800 · width 125 · uppercase</p> <p className="type-title-sm">The quick brown fox jumps over the lazy dog</p> </div> </div>| Class | Font | Size | Line height | Weight | Width | Notes |
|---|---|---|---|---|---|---|
type-title-5xl | Mona Sans VF | 64px (4rem) | 72px (4.5rem) | 900 | 125 | |
type-title-4xl | Mona Sans VF | 40px (2.5rem) | 48px (3rem) | 900 | 125 | |
type-title-3xl | Mona Sans VF | 30px (1.875rem) | 36px (2.25rem) | 900 | 125 | |
type-title-xl | Mona Sans VF | 20px (1.25rem) | 28px (1.75rem) | 800 | 110 | |
type-title-lg | Mona Sans VF | 18px (1.125rem) | 28px (1.75rem) | 800 | 110 | |
type-title-md | Mona Sans VF | 16px (1rem) | 24px (1.5rem) | 800 | 110 | |
type-title-sm | Mona Sans VF | 14px (0.875rem) | 20px (1.25rem) | 800 | 125 | Uppercase, letter-spaced |
Heading styles use the Mona Sans VF display font, except for heading-2xs. Use these styles only for headings.
| Class | Font | Size | Line height | Weight |
|---|---|---|---|---|
type-heading-2xl | Mona Sans VF | 24px (1.5rem) | 32px (2rem) | 700 |
type-heading-xl | Mona Sans VF | 20px (1.25rem) | 28px (1.75rem) | 700 |
type-heading-lg | Mona Sans VF | 18px (1.125rem) | 28px (1.75rem) | 700 |
type-heading-md | Mona Sans VF | 18px (1.125rem) | 28px (1.75rem) | 650 |
type-heading-sm | Mona Sans VF | 14px (0.875rem) | 20px (1.25rem) | 650 |
type-heading-xs | Mona Sans VF | 12px (0.75rem) | 16px (1rem) | 650 |
type-heading-2xs | Inter | 11px (0.6875rem) | 16px (1rem) | 600 |
Text styles use the Inter body font. Most content, labels and captions should be rendered using these styles.
<div className="not-prose my-8 space-y-6"> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-text-md · 16px/24px · weight 400</p> <p className="type-text-md">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-text-md-strong · 16px/24px · weight 500</p> <p className="type-text-md-strong">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-text-md-stronger · 16px/24px · weight 600</p> <p className="type-text-md-stronger">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-text-sm · 14px/20px · weight 400</p> <p className="type-text-sm">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-text-sm-strong · 14px/20px · weight 500</p> <p className="type-text-sm-strong">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-text-sm-stronger · 14px/20px · weight 600</p> <p className="type-text-sm-stronger">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-text-xs · 12px/16px · weight 400</p> <p className="type-text-xs">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-text-xs-strong · 12px/16px · weight 500</p> <p className="type-text-xs-strong">The quick brown fox jumps over the lazy dog</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-text-xs-stronger · 12px/16px · weight 600</p> <p className="type-text-xs-stronger">The quick brown fox jumps over the lazy dog</p> </div> </div>| Class | Size | Line height | Weight |
|---|---|---|---|
type-text-md | 16px (1rem) | 24px (1.5rem) | 400 |
type-text-md-strong | 16px (1rem) | 24px (1.5rem) | 500 |
type-text-md-stronger | 16px (1rem) | 24px (1.5rem) | 600 |
type-text-sm | 14px (0.875rem) | 20px (1.25rem) | 400 |
type-text-sm-strong | 14px (0.875rem) | 20px (1.25rem) | 500 |
type-text-sm-stronger | 14px (0.875rem) | 20px (1.25rem) | 600 |
type-text-xs | 12px (0.75rem) | 16px (1rem) | 400 |
type-text-xs-strong | 12px (0.75rem) | 16px (1rem) | 500 |
type-text-xs-stronger | 12px (0.75rem) | 16px (1rem) | 600 |
Code styles use the Mona Sans Mono VF monospace font. Use it for displaying code or tabular data.
<div className="not-prose my-8 space-y-6"> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-code-md · 16px/24px · weight 400</p> <p className="type-code-md">const hello = "world";</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-code-md-strong · 16px/24px · weight 500</p> <p className="type-code-md-strong">const hello = "world";</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-code-sm · 14px/20px · weight 400</p> <p className="type-code-sm">const hello = "world";</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-code-sm-strong · 14px/20px · weight 500</p> <p className="type-code-sm-strong">const hello = "world";</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-code-xs · 12px/16px · weight 400</p> <p className="type-code-xs">const hello = "world";</p> </div> <div className="space-y-1 p-4 border border-stroke-neutral rounded-lg"> <p className="text-xs font-mono text-foreground-neutral-weak mb-2">.type-code-xs-strong · 12px/16px · weight 500</p> <p className="type-code-xs-strong">const hello = "world";</p> </div> </div>| Class | Size | Line height | Weight |
|---|---|---|---|
type-code-md | 16px (1rem) | 24px (1.5rem) | 400 |
type-code-md-strong | 16px (1rem) | 24px (1.5rem) | 500 |
type-code-sm | 14px (0.875rem) | 20px (1.25rem) | 400 |
type-code-sm-strong | 14px (0.875rem) | 20px (1.25rem) | 500 |
type-code-xs | 12px (0.75rem) | 16px (1rem) | 400 |
type-code-xs-strong | 12px (0.75rem) | 16px (1rem) | 500 |
<h1 className="type-title-4xl">Hero Title</h1>
<h2 className="type-heading-2xl">Page Heading</h2>
<h3 className="type-heading-lg">Section Heading</h3>
<p className="type-text-md">Body text paragraph.</p>
<p className="type-text-sm-strong">Emphasized small text.</p>
<code className="type-code-sm">inlineCode()</code>