Typography
Covers: text sizes, line heights, heading styles, font weights, tracking, text width, text-pretty, text-balance, eyebrow text.
Design Rules
Body, paragraph, and general content is
text-base(16px) at every breakpoint.text-smis for labels, captions, and helper text, never for reading copy;text-xsis for neither.Never use
font-boldfor headings: usefont-semiboldorfont-medium.Use at most two font weights per view: one for emphasis (headings, labels), one for body; reuse them.
Make hierarchy levels identical or clearly different, never nearly the same. Merge almost-equal sizes or separate them enough to create a visible rank.
Don't hand-tune leading on display type. Tailwind ships
line-height: 1fromtext-5xlup, which is already correct; overriding it withleading-[1.05]or similar loosens type that should stay tight. Hand-tune leading on body copy instead, where the default is set for a measure your layout may not have.Use
text-balanceon short headings,text-prettyon paragraph text and on any title long enough to wrap past two lines (article and blog titles: see Prose Content).Add
tracking-tightto headings larger thantext-xl, unless the font is a condensed headline font (already tight).Large type should not look airy: tighten tracking before adding weight, and constrain line length before shrinking the type.
Small labels need more air than display type: avoid cramped
tracking-tightor dense line-height ontext-smand below unless the text is numeric or code-like.Never use
uppercaseon eyebrow text unless it's a monospace font; with monospaceuppercase, always addtracking-wide.For displayed data, omit labels when format, position, or context makes the value self-explanatory. Keep explicit labels for forms, specifications, and views people scan by field name.
In dense product UI, links need not all use the accent colour. Preserve affordance through context, ink, weight, underline, hover, and focus; reserve bright link colour for sparse actions that need emphasis.
Coding Rules
- Constrain text width with
max-w-[*ch]directly on the element: see Heading Groups for values pertext-*size. - When a project uses Inter, use the official variable font (
InterVariable) withfont-display: swap; enable useful OpenType features throughfont-feature-settings(for examplecv02,cv03,cv04,cv11,ss01,ss03). Do not introduce Inter merely because it is a familiar UI default. - Always read Custom Fonts when using custom fonts.
- Do not change
font-weighton hover or selected states of controls or nav items: the width shift reflows adjacent text. Change color, opacity, or underline instead. Audit rule:type-hover-weight-shift.