Typography
Typography scale, text roles, and hierarchy used across PyColors UI.
OverviewLink to section
Typography is one of the strongest signals of product quality. It gives every interface a readable structure before color, spacing, motion, or decoration are added.
PyColors treats typography as a system, not as local page styling. The goal is to keep dashboards, documentation, settings pages, marketing sections, forms, and product flows readable and consistent as the product grows.
At the end of this page, you will understand how PyColors handles:
- font roles
- heading hierarchy
- body text density
- labels and metadata
- semantic text roles
- production usage rules
Why this matters
A weak type system makes a product feel unfinished even when the UI components are correct. Stable typography improves scanning, reduces visual noise, and makes the interface feel more deliberate.
What you’ll defineLink to section
Font roles
Separate UI text, brand accents, and technical values with predictable font variables.
Hierarchy
Use a limited heading ladder so pages stay scannable without overloading the table of contents.
Usage rules
Keep text roles semantic so reusable components stay coherent across light and dark mode.
StepsLink to section
Use font roles instead of font choicesLink to section
PyColors exposes fonts as CSS variables and utilities. Components should depend on the role of the font, not on a hardcoded family.
import { Inter } from "next/font/google";
const inter = Inter({
subsets: ["latin"],
variable: "--font-sans", // highlight
});Common roles are:
| Role | Utility | Purpose |
|---|---|---|
| UI and content | font-sans | Default interface and readable content |
| Brand accent | font-brand | Headings, hero sections, premium identity |
| Technical values | font-mono | Code, IDs, tokens, CLI output |
Implementation note
The exact font family can change over time. The important part is that components keep consuming stable font roles.
Choose density by surfaceLink to section
PyColors keeps text density simple. Product interfaces should stay efficient, while documentation and marketing content should feel easier to read.
| Surface | Default | Reason |
|---|---|---|
| SaaS UI and dashboards | text-sm | Dense enough for product workflows |
| Docs, guides, and marketing | text-base | More comfortable for reading |
| Labels and metadata | text-xs | Compact context without competing with headings |
This split keeps dashboards efficient while making documentation feel calm and premium.
Build hierarchy with a limited scaleLink to section
Headings should make structure obvious without turning every section into a visual event.
Page title
Section title
Subsection title
Minor heading
Readable body text with enough rhythm for documentation and product copy.
export function HeadingHierarchy() {
return (
<div className="space-y-4">
<h1 className="text-4xl font-semibold tracking-tight">
Page title
</h1>
<h2 className="text-3xl font-semibold tracking-tight">
Section title
</h2>
<h3 className="text-2xl font-semibold tracking-tight">
Subsection title
</h3>
<h4 className="text-xl font-medium tracking-tight">
Minor heading
</h4>
<p className="text-base leading-7 text-muted-foreground">
Readable body text.
</p>
</div>
);
}Why it mattersLink to section
Typography is where product quality becomes visible. Users may not notice the type system directly, but they notice when the product feels harder to scan, less structured, or visually inconsistent.
Without a stable typography system, you will:
- invent heading sizes page by page
- overuse font weight to create emphasis
- make dashboards visually noisy
- reduce trust in product and documentation surfaces
- make components harder to reuse consistently
With a stable system, every page feels calmer, more intentional, and easier to understand.
Product principle
Typography should reduce cognitive load. It should guide the reader through the product, not compete for attention.
Text rolesLink to section
Primary text is used for the main content a user needs to read or act on.
Secondary text supports the main message with descriptions, helper copy, and contextual details.
Metadata is reserved for timestamps, labels, status hints, and compact secondary information.
Product status
Ready for production review
Labels help orientation without becoming headings.
Neutral product information.
Destructive
Errors and dangerous actions.
Links and primary intent.
| Role | Utility | Usage |
|---|---|---|
| Primary text | text-foreground | Main readable content |
| Secondary text | text-muted-foreground | Descriptions, helper text, supporting copy |
| Brand or action text | text-primary | Links and highlighted actions |
| Destructive text | text-destructive | Errors, deletion flows, dangerous messaging |
| Technical text | font-mono | Code, tokens, identifiers, CLI values |
Usage rulesLink to section
Use typography roles to create consistent product surfaces instead of styling text from scratch each time.
export function ProductSummary() {
return (
<section className="space-y-2">
<p className="text-xs font-medium uppercase tracking-wide text-muted-foreground">
Starter Pro
</p>
<h2 className="text-2xl font-semibold tracking-tight">
Production-shaped SaaS foundation
</h2>
<p className="max-w-prose text-sm leading-6 text-muted-foreground">
Use semantic text roles to keep product copy, labels, and descriptions
predictable across reusable surfaces.
</p>
</section>
);
}Decision guideLink to section
Use this typography system if:
- you are building SaaS dashboards, docs, settings, or marketing pages
- you need consistent hierarchy across multiple product areas
- you want reusable components to feel coherent without local overrides
- you care about light and dark mode readability
Do not override it if:
- the change only solves one local visual preference
- the same need appears in multiple places and should become a token
- the new size, weight, or color weakens hierarchy consistency
Ready to move from design system to product foundation?
Starter Pro gives you a stronger SaaS baseline with auth, billing, backend structure, and production-shaped flows. → /docs/starter-pro
Common mistakesLink to section
Prefer
- limited heading sizes
- semantic text colors
- muted helper copy
- labels for metadata
- reasonable line lengths
Avoid
- too many font sizes in one panel
- uppercase long-form copy
- raw color values for text
- random heading sizes between pages
- using weight instead of structure