# Typography

A restrained type hierarchy for dense product interfaces.

Zenos uses a compact semantic type system for product interfaces. Each role combines a family, size, line height, and weight so hierarchy remains consistent across controls, forms, dashboards, and long-form content.

The default stacks use [SUSE, Albert Sans, and Geist Mono](/foundations/fonts/). Consumers load the font files or override the family tokens; Zenos defines how each family is used.

## Type scale

<div className="zenos-type-scale not-content">
  <div className="zenos-type-scale__row">
    <span>Heading h1</span>
    <strong className="type-heading-h1">Build with clarity.</strong>
    <code>32 / 36</code>
  </div>
  <div className="zenos-type-scale__row">
    <span>Heading h2</span>
    <strong className="type-heading-h2">Build with clarity.</strong>
    <code>28 / 32</code>
  </div>
  <div className="zenos-type-scale__row">
    <span>Heading h3</span>
    <strong className="type-heading-h3">Build with clarity.</strong>
    <code>24 / 28</code>
  </div>
  <div className="zenos-type-scale__row">
    <span>Heading h4</span>
    <strong className="type-heading-h4">Build with clarity.</strong>
    <code>20 / 24</code>
  </div>
  <div className="zenos-type-scale__row">
    <span>Heading h5</span>
    <strong className="type-heading-h5">Build with clarity.</strong>
    <code>16 / 20</code>
  </div>
  <div className="zenos-type-scale__row">
    <span>Body large</span>
    <p className="type-body-l">Interfaces should remain readable under pressure.</p>
    <code>16 / 24</code>
  </div>
  <div className="zenos-type-scale__row">
    <span>Body medium</span>
    <p className="type-body-m">Interfaces should remain readable under pressure.</p>
    <code>14 / 20</code>
  </div>
  <div className="zenos-type-scale__row">
    <span>Body small</span>
    <p className="type-body-s">Interfaces should remain readable under pressure.</p>
    <code>12 / 16</code>
  </div>
  <div className="zenos-type-scale__row">
    <span>Emphasis</span>
    <strong className="type-emphasis-m">24,860</strong>
    <code>24 / 28</code>
  </div>
  <div className="zenos-type-scale__row">
    <span>Code</span>
    <code className="type-code">const status = "ready";</code>
    <code>12 / 20</code>
  </div>
</div>

Values are shown as font size / line height in pixels. The complete heading scale continues through `h6` and `h7` for dense labels and deeply nested sections.

## Roles

| Role     | Family      | Scale         | Use                                                     |
| -------- | ----------- | ------------- | ------------------------------------------------------- |
| Heading  | SUSE        | `h1`–`h7`     | Page titles, section headings, and structural hierarchy |
| Body     | Albert Sans | `l`, `m`, `s` | Interface copy, labels, descriptions, and messages      |
| Emphasis | SUSE        | `l`, `m`, `s` | Metrics and short high-signal values                    |
| Code     | Geist Mono  | Fixed         | Commands, identifiers, shortcuts, and technical values  |

Choose a role by meaning before choosing a size. A metric and a heading can have similar dimensions while serving different reading patterns.

## Heading hierarchy

Headings establish the document outline. Keep levels sequential and use CSS or `Text` sizing when the visual scale needs to differ from the semantic element.

```tsx
<Text type="heading" size="h2">
  Asset inventory
</Text>
```

`h7` is a visual role rendered as a paragraph by default because HTML only defines six heading levels. Use `as` when another semantic element is required.

## Body copy

Use medium body text for most product UI. Large body text suits introductions and comfortable reading; small body text is reserved for supporting metadata where space is constrained.

Body text supports `regular`, `medium`, and `bold` weights. Prefer weight and spacing for hierarchy before reducing contrast. Long descriptions, errors, and instructions must be allowed to wrap.

## Emphasis and metrics

Emphasis styles are designed for concise values such as totals, percentages, or status counts. They use the heading family without becoming part of the page outline.

Use tabular numerals when values update in place or align in a column:

```tsx
<Text type="emphasis" size="l" className="tabular-nums">
  24,860
</Text>
```

Do not use emphasis for long sentences. Its tighter rhythm is intended for short, scannable information.

## Code and technical content

The code role uses Geist Mono with a slashed zero and disabled contextual alternates. Use it for machine-readable values, commands, keyboard input, and identifiers. Explanatory prose should remain body text.

## Color and contrast

Text colors describe hierarchy and meaning:

- `default` for primary content
- `subtle` for supporting content
- `subtlest` for low-priority metadata
- feedback roles for danger, warning, success, and information
- `contrary` for content on strong inverse surfaces

Color does not replace labels or status text. Ensure every role remains legible against its actual surface in light and dark themes.

## Line length and wrapping

Keep prose near 45–75 characters per line. Product labels may be shorter, but essential text should not be truncated simply to preserve a fixed-height layout.

Use `truncate` only when the full value remains available elsewhere. Use `maxLines` for bounded previews, and test both with long unbroken values, increased browser zoom, and translated content.

## Using Text

`Text` applies the semantic roles while preserving polymorphism, native attributes, refs, alignment, color, truncation, and line clamping.

```tsx
<Text type="heading" size="h3" as="h2">
  Recent activity
</Text>

<Text size="m" color="subtle">
  Updated five minutes ago
</Text>

<Text type="code" as="span">
  scan_01J8M2
</Text>
```

Native headings and paragraphs remain appropriate when a Zenos-specific visual role is unnecessary. Typography should reinforce semantics rather than replace them.

Source: https://zenos-ui.pages.dev/foundations/typography/