Skip to content

Typography

Sets headings, text, labels, captions, code, figures, lists, quotes and tables from Tailwind's standard text scale with Silkware's line heights and tracking.

Quarterly supplier review

Purchasing, Bergamo. Updated by the ERP at 09:40.

What changed

Deliveries from Ferrolva Acciai arrived on time in 11 of 12 weeks. Plastrena moved its cut-off to Tuesday, which gives the Padova line two more days to plan.

Next steps

  • Move steel orders to a weekly rhythm.
  • Review the Cuscinal bearing contract in March.
  • Keep Gommarda as the backup supplier for seals.

Source: purchase orders PO-2401 to PO-2418.

Installation

There is nothing to install. Typography is not a component and has no registry item: it is Tailwind's standard text scale, which the Silkware theme in app/globals.css gives a line height and tracking for every step. If your project uses the theme (see Theming), the classes already look like Silkware.

The sizes are Tailwind's (text-sm is 14px, text-2xl is 24px), the same classes the components in components/ui use. Weight is a separate utility. Apply the classes to the element that carries the meaning: a heading element for a heading, a paragraph for text.

Usage

<h1 className="font-heading text-2xl font-semibold">Purchase orders</h1><p className="text-sm text-muted-foreground">Bergamo plant. Updated by the ERP at 09:40.</p><h2 className="font-heading text-xl font-semibold">Waiting on a supplier</h2><p className="text-sm">Four orders wait on Ferrolva Acciai.</p>

Pick the classes by the role of the text, not by the size you want.

RoleElementClasses
Page titleh1font-heading text-2xl font-semibold
Section titleh2font-heading text-xl font-semibold
Subsection titleh3font-heading text-lg font-semibold
Minor headingh4font-heading text-base font-semibold
Card and dialog titleCardTitle, DialogTitleSet by the component
Group headingh5text-sm font-semibold
Small headingh6text-sm font-medium text-muted-foreground
Bodyptext-sm
Running textptext-base leading-relaxed
Secondary textp, spantext-sm text-muted-foreground
LabelLabelSet by the component
Captionp, figcaptiontext-xs text-muted-foreground
Codecodefont-mono text-sm
Figuredd, ptext-3xl font-semibold tabular-nums
Docs or landing page titleh1font-heading text-4xl font-semibold

The size, line height and tracking of every step are on the Typography foundation.

Three things people get wrong:

  • Weight is not part of a size. A heading needs font-semibold; text-xl alone is a 20px line of text at 400.
  • Do not add leading-* or tracking-* to a heading, or write an arbitrary size. The step carries the line height and tracking that make it look right.
  • For Chinese text, set lang="zh". The theme then switches to Noto Sans SC, removes the tracking and opens the line height, on every step.

Examples

Scale

The standard steps from text-6xl down to text-xs, with their Silkware metrics.

text-6xl

Company Brain

text-5xl

Company Brain

text-4xl

How Bridge reads your ERP

text-3xl

How Bridge reads your ERP

text-2xl

Purchase orders

text-xl

Waiting on a supplier

text-lg

Order PO-2418

text-base

Giulia opens the order, checks the supplier and sends it to Luca.

text-sm

Giulia opens the order, checks the supplier and sends it to Luca.

text-xs

Updated by the ERP at 09:40.

Headings

Six heading levels for an application screen: 24, 20, 18 and 16px at 600, then two 14px levels. The element sets the level; the classes follow it.

Purchase orders

Waiting on a supplier

Ferrolva Acciai

Order PO-2418

Delivery
Carrier and dates

Page title on a docs or landing page

A page that stands alone, such as a docs page or a landing page, takes a larger title, text-4xl, over a text-lg line in muted grey.

How Bridge reads your ERP

Bridge connects Silkware to the systems Brevia already runs, without a new database.

Body, secondary text, labels and captions

Running text in text-base leading-relaxed. Text in an application in text-sm, with secondary facts in text-muted-foreground. A label is the Label component; the note under a field is a text-xs caption.

Giulia opens the order, checks the quantities against the ERP and sends it to Luca in purchasing. Luca confirms the supplier and the order ships on Friday.

Four orders wait on Ferrolva Acciai.

The oldest was raised on Monday.

Printed on the label of every box.

Figures

Figures in a dashboard are text-3xl font-semibold with tabular-nums, so digits line up and do not jump when they change. Each has its label above it.

Open orders
14
On time
92%
Value
€48,210

Inline code

A code element in font-mono text-sm on the muted surface. Code is the one place the theme allows a monospace font: font-mono is a system monospace stack.

Filter the list with status:waiting to see orders that need a person.

Lists

Use list-disc or list-decimal, a left padding of 1.5rem and a muted marker. Use an ordered list only when the order matters.

  • Steel bar from Ferrolva Acciai
  • Bearings from Cuscinal
  • Seals from Gommarda
  1. Raise the order
  2. Approve the order
  3. Confirm the delivery

Blockquote

A blockquote in text-statement with a thin rule on the left, and a figcaption for the source in text-sm.

We found the late delivery before the line stopped.
Marco, quality, Brescia

Table

A plain table in text-sm for a small piece of reference data inside text, with a hairline between rows, a caption and header cells with scope. For interactive data, use the Table component.

Lead time by supplier
SupplierSiteDays
Ferrolva AcciaiBrescia6
PlastrenaPadova4

Editorial: display

text-display is for the one statement a landing page leads with. It is fluid, 40px on a phone and up to 83px on a wide screen. Add font-semibold and text-balance. Not for application screens.

Agents for the whole company

Editorial: statement

text-statement is a short declaration or a pulled quote on a marketing page, fluid from 20px to 30px, in the regular weight.

An engineer learns how Brevia works, then builds what it needs.

Editorial: lead

text-lead opens a marketing page or section in a line or two: 18px, 16px on phones.

Agentic OS runs the agents and the apps your engineer builds, next to the systems you already use.

Accessibility

Typography has no keyboard behaviour. Its accessibility is the structure of the page.

KeyAction
TabDoes nothing on text. Links and controls in the text take focus in their reading order.

The browser provides:

  • Heading, list, quote, table and code semantics, from the elements.
  • Reflow and zoom: the standard steps are in rem, so text follows browser zoom and a larger default font size set in the browser. The editorial steps are fluid clamp values and follow zoom.

You provide:

  • One h1 per page and heading levels without gaps: an h3 follows an h2. The class sets how it looks and the element sets what it is.
  • Text contrast of 4.5:1 or more. text-muted-foreground passes on the page and card surfaces; check it on any other surface.
  • A line length of about 45 to 75 characters for running text. Set max-w-prose or a max-w-xl on the container.
  • lang on text in another language, so screen readers switch voices.

Guidelines

When to use

  • For all text outside a component. Components set their own type.
  • For the content of documentation, articles and long-form pages.

When not to use

  • To resize text inside a component such as a Button or a Card. Use the component's own variants.
  • To make something look like a heading when it is not one. A bold line of text is not a heading: use the heading element.
  • For emphasis inside a paragraph. Use strong or em.
  • The editorial steps on an application screen. Use the role table.

Content

  • Write headings in sentence case and without a full stop.
  • Use one text-display per page, and only on marketing pages that lead with a statement.
  • Keep text-lead to two lines.
  • Put units and dates in secondary text, and keep them next to the value they describe.

Hierarchy

Supplier review

Three changes to agree before March.

Do

Make the heading larger and heavier than the text under it, in steps from the scale.

Supplier review

Three changes to agree before March.

Don’t

Don’t set the supporting line larger than its title. The reader starts at the wrong place.

API reference

Typography has no components and no props. The steps are Tailwind's text utilities; their line heights and tracking are the --leading-* and --tracking-* variables in app/globals.css. See the Typography foundation for the full definition of each step.