Typography
How prose, the Tailwind scale, and global styles set all text.
Prose and not-prose
Prose styles long-form content by element. ReaderView, Viewer, Editor, and Explorer wrap their content in getProseClasses(size), and the typography plugin then styles every plain heading, paragraph, list, link, code, and table inside it. Everywhere else, classes set the text. When you put UI inside prose, such as a card or a demo, wrap it in not-prose and size its text with the classes in the next section.
UI text sizes
Choose the size from the job of the text, not from how large you want it. Each row names one job and the components that use it. When a component sets the text, such as Card.Title or Field.Description, use the component and do not add a size class. Each size sets its own line height, shown after the size. Use only these sizes. The 11, 13, and 15 steps are project tokens that fill gaps in the Tailwind scale, so write text-13, not text-[13px]. Older code outside the UI library still uses the arbitrary values. Use the tokens in new code.
Headings outside prose
Outside prose, a heading has no size of its own. Tailwind's base styles give it the size of the text around it, as the last row shows. Always give it a size class from the table above. Choose the level from the page outline and the size from the job. On reader pages, global.css makes every h4 18px, and a size class does not change it, so use h2 or h3 in UI.
Get started
Install the snippet
Weekly product report
Takes the size of the text around it
Color and weight
Three colors and two weights cover all UI text. Body text uses the default weight.
Primary is for content: body text, titles, and values.
Secondary is for supporting text, such as descriptions.
Muted is for placeholders, disabled text, and quiet marks, such as separators and group labels.
Semibold is for titles, labels, and short phrases that must stand out.
Bold is for headings and dialog titles.
Usage
These are defaults, not laws. Break one when you have a good reason, or when it makes the design more cohesive or more interesting.
not-proseturns prose off for an element and for everything inside it. Prose cannot be turned on again inside it.- Some styles still reach a not-prose block. global.css makes every heading bold and gives every p a bottom margin. Text inherits the line height of the prose around it, unless a class sets one. On prose pages, every h4 is 18px and every table keeps its prose borders.
- Add a
leading-*class only to a single-line control with a fixed height, such as a button or a menu item. Text that can wrap keeps the line height of its size. - RoundHog has no 600 face, so
font-semiboldandfont-boldlook the same today. Still use the weight that the table names, so the text is correct if the font gets a 600 face. PROSE_COREholds the shared prose modifiers: link style, line height, heading tracking, and the h1 size. The default size isprose-sm, and global.css sets its body text to 15px. Change these in one place, not in each page.- Use
text-3xland larger only on marketing pages. No component uses them. - Text uses the site font, RoundHog, from
body. Do not set a font on UI text. Usefont-codefor code. - Give each page one h1. Choose heading levels from the page outline and never skip a level. Write headings, labels, and buttons in sentence case.
- Use
tabular-numsfor numbers in tables and counters.





