Typography
Type stack, role presets, and the Typography component.
Clarity by Nivoda ships a single sans-serif stack and a fixed list of role presets. Every run of text in a product surface is one of those presets — pick the role, not the size.
Stack
Inter Variable, loaded via @fontsource-variable/inter in @nivoda/components. Falls through to system-ui, sans-serif if the variable font hasn't loaded. Monospace (JetBrains Mono, monospace) is used for code and tabular figures only.
Serif display typography is reserved for marketing surfaces — it doesn't appear in product UI or in these docs.
Role presets
Twelve roles, each a fixed combination of size, weight, line-height and tracking. Source: packages/components/src/components/atoms/typography/typography.tsx.
h1 · 96px / 6rem · 300 · lh 112pxh2 · 60px / 3.75rem · 300 · lh 72pxh3 · 48px / 3rem · 500 · lh 56pxh4 · 36px / 2.25rem · 500 · lh 44pxh5 · 24px / 1.5rem · 500 · lh 32pxh6 · 20px / 1.25rem · 500 · lh 32pxsubtitle-1 · 16px / 1rem · 400 · lh 28pxsubtitle-2 · 14px / 0.875rem · 500 · lh 20pxbody-1 · 16px / 1rem · 400 · lh 24pxemphasis raising weight to 500 for in-line stress.body-1, emphasis · 16px · 500 · lh 24pxbody-2 · 14px / 0.875rem · 400 · lh 20pxbody-2, emphasis · 14px · 500 · lh 20pxcaption · 12px / 0.75rem · 400 · lh 20px · tracking widecaption, emphasis · 12px · 500 · lh 20pxHow to use
import { Typography } from "@nivoda/components/typography"
<Typography variant="h1">Page title</Typography>
<Typography variant="body-1">The default for long-form prose.</Typography>
<Typography variant="body-2" emphasis>Stressed UI copy.</Typography>
<Typography variant="caption">Helper text under a form field.</Typography>Pick the variant that matches the role, not the size. "Is this a page title?" → h1. "Is this a caption under a form field?" → caption. The component picks a sensible HTML element for the role (h1–h6 render their matching tag; subtitles render <h6>; body and caption render <p>); pass as to override when the visual weight shouldn't imply document structure.
Colour is not a Typography concern. Text inherits from ambient context; override with className="text-muted-foreground" or similar. Margins aren't a Typography concern either — spacing composes via the parent's flex gap-* or space-y-*.
See the Typography component for the full props table, asChild usage, and best practices.
Source
- Role presets:
packages/components/src/components/atoms/typography/typography.tsx - Component reference:
COMPONENT.md— authored alongside the code - Font-size and weight tokens:
packages/tokens/src/typography.tokens.json