Typography
Typography system with 10-step scale (0-9), font weights, and formatting components. The typography infrastructure (scale system, token structure) is from Radix Themes, but Kookie UI uses custom typography values that differ from Radix Themes.
For complete typography documentation and advanced customization, visit the Radix Themes Typography documentation. Note that Kookie UI's typography values are customized and may not match Radix Themes exactly.
Installation
shellUsage
Use Text and Heading components to render titles and body copy. These components share size and weight props for consistent typography.
tsxType Scale
10-step size scale (0-9) with corresponding font size, line height, and letter spacing values:
cssSize Scale
Size 0
Extra small text for fine print and micro labels.
tsxSize 1
Small text for captions and labels.
tsxSize 2
Body text for secondary content.
tsxSize 3
Standard text for main content.
tsxSize 4
Large text for important content.
tsxSize 5
Heading text for section titles.
tsxSize 6
Large heading for page titles.
tsxSize 7
Display text for hero sections.
tsxSize 8
Hero text for main headlines.
tsxSize 9
Massive text for impact headlines.
tsxFont Weight
Use weight prop to control text emphasis and hierarchy:
tsxAvailable weights: thin, extralight, light, regular, medium, semibold, bold, extrabold.
Formatting Components
Compose formatting components to add emphasis and structure:
tsxtsxFont Family
Every typeface decision lives in two tiers, and nowhere else.
Stacks — which typefaces exist. Three of them, declared on :root:
cssRoles — which stack each kind of text uses. Declared on .radix-themes:
cssChange a stack and every role using it moves with it. Change a role and only that role moves.
The Radix Themes names (--default-font-family, --heading-font-family, --code-font-family, --strong-font-family, --em-font-family, --quote-font-family) are aliases of the roles above, kept so Radix documentation still applies. Overriding either spelling works.
Loading Fonts
Kookie's stylesheet loads no webfonts. The defaults are system stacks, so importing the library costs zero font requests.
To use Kookie's own typefaces — Inter, JetBrains Mono, Playfair Display — import the opt-in stylesheet:
tsxIf you already load fonts yourself, skip that file and point the stacks at your faces instead. With next/font:
tsxcssCustom Fonts
Swap a typeface everywhere it is used by overriding a stack at :root:
cssGive a single role its own typeface by overriding it at .radix-themes:
cssRoles are declared on .radix-themes rather than :root because <Theme> switches them per subtree — an override at :root sits on an ancestor and would be overruled. Stacks are the opposite: declare those at :root.
Theme Props
fontFamily sets the body role for a subtree:
tsxheadingFontFamily sets the heading role independently:
tsxLeave headingFontFamily off and headings follow the body font — including when fontFamily changes, and including when you have set --font-heading yourself.
Individual pieces of text opt out with the font prop, which reads the stacks directly:
tsxDefaults
With @kushagradhawan/kookie-ui/fonts.css imported, the three stacks become Inter, JetBrains Mono and Playfair Display.
Credits
The typography infrastructure (10-step scale system and token structure) is from Radix Themes by WorkOS. However, Kookie UI uses custom typography values that have been modified from the original Radix Themes values. The typography system structure and approach credit goes to Radix Themes, while the specific typography values are custom to Kookie UI.