Skip to content

Typography

Three voices with one job each: Literata is Sypnia speaking, Instrument Sans is the interface, Martian Mono is what a machine said.

import '@sypnia/ui/css'

On this page
  1. The three voices
  2. The sizes
  3. When to use it
  4. For everyone

The three voices

Voice · Literata · sy-display, sy-voice

Every bug leaves a light on.

Interface · Instrument Sans · sy-text, sy-heading

Create a table, import a CSV, invite your team.

Machine · Martian Mono · sy-machine, code

POST /cases/place-order → 201 in 38 ms

Code
// Three voices, each with one job. Serif says, sans operates, mono quotes the machine.
export default function Voices() {
  return (
    <div className="sy-stack" style={{ '--gap': 'var(--s-6)' } as React.CSSProperties}>
      <div className="sy-stack" style={{ '--gap': 'var(--s-1)' } as React.CSSProperties}>
        <span className="sy-text--xs sy-text--muted">Voice · Literata · <code>sy-display</code>, <code>sy-voice</code></span>
        <p className="sy-display sy-display--sm">Every bug leaves a light on.</p>
      </div>
      <div className="sy-stack" style={{ '--gap': 'var(--s-1)' } as React.CSSProperties}>
        <span className="sy-text--xs sy-text--muted">Interface · Instrument Sans · <code>sy-text</code>, <code>sy-heading</code></span>
        <p className="sy-text sy-text--lead">Create a table, import a CSV, invite your team.</p>
      </div>
      <div className="sy-stack" style={{ '--gap': 'var(--s-1)' } as React.CSSProperties}>
        <span className="sy-text--xs sy-text--muted">Machine · Martian Mono · <code>sy-machine</code>, <code>code</code></span>
        <p className="sy-machine" style={{ fontSize: 'var(--text-md)' }}>POST /cases/place-order → 201 in 38 ms</p>
      </div>
    </div>
  );
}

The sizes

Display sizes for what Sypnia says (titles, empty states); text sizes for everything else. They grow a little on wide screens.

display-lgLight
display-mdLight
display-smLight
display-xsLight
text-xlImport a CSV
text-lgImport a CSV
text-mdImport a CSV
text-smImport a CSV
text-xsImport a CSV
text-2xsImport a CSV
Code
// The sizes. Display sizes are for what Sypnia says; text sizes for everything the person reads and presses.
const display = ['lg', 'md', 'sm', 'xs'];
const text = ['xl', 'lg', 'md', 'sm', 'xs', '2xs'];
export default function Scale() {
  return (
    <div className="sy-cols" style={{ '--cols': 2, '--gap': 'var(--s-6)' } as React.CSSProperties}>
      <div className="sy-stack" style={{ '--gap': 'var(--s-3)', minWidth: 0, overflow: 'hidden' } as React.CSSProperties}>
        {display.map((d) => <div key={d} className="sy-row sy-row--nowrap" style={{ '--gap': 'var(--s-3)', alignItems: 'baseline' } as React.CSSProperties}><code style={{ flex: 'none', width: '6.5rem' }}>display-{d}</code><span className={`sy-display sy-display--${d} sy-truncate`}>Light</span></div>)}
      </div>
      <div className="sy-stack" style={{ '--gap': 'var(--s-3)' } as React.CSSProperties}>
        {text.map((t) => <div key={t} className="sy-row sy-row--nowrap" style={{ '--gap': 'var(--s-3)', alignItems: 'baseline' } as React.CSSProperties}><code style={{ flex: 'none', width: '6.5rem' }}>text-{t}</code><span className="sy-truncate" style={{ fontSize: `var(--text-${t})` }}>Import a CSV</span></div>)}
      </div>
    </div>
  );
}

When to use it

Use it when

  • The voice for page titles, empty states and questions to the person.
  • Mono for code, ids, keys, paths and logs.

Do not use it when

  • The voice for buttons, labels or table cells.
  • All-caps labels: sentence case everywhere.

For everyone

  • Body text is 16 px or more, with a line height of 1.5 or more.
  • Fonts are self-hosted, with fallbacks of the same width, so text does not jump when they load.
  1. The three voices
  2. The sizes
  3. When to use it
  4. For everyone

    Search pages, sections and terms