A list of typography tokens available in Cerberus.
Cerberus provides a set of font tokens (theme.tokens.fonts) that define the font families used throughout the design system. These font tokens serve as the foundation for all text styles and typography decisions.
This is example text
displayPrimary font reserved for display headings
var(--font-display, var(--font-poppins, sans-serif))
This is example text
sansPrimary font used for body and headings
var(--font-sans, var(--font-poppins, sans-serif))
This is example text
monoCode font used for any code related scenarios
var(--font-mono, var(--font-recursive, monospace))
Font tokens are designed to be semantic and descriptive:
display - Primary font reserved for display headings (Poppins)sans - Primary font used for body text and regular headings (Poppins)mono - Monospace font used for code and technical content (Recursive)Customizing Font Tokens:
Font tokens can be customized in two ways: at the Panda config level or through CSS custom properties.
Option 1: Panda Config Level
Override font tokens directly in your panda.config.ts file:
import { createCerberusConfig, createCerberusPreset,} from '@cerberus/panda-preset'
export default createCerberusConfig({ presets: [createCerberusPreset()],
include: ['./app/**/*.{ts,tsx}'], exclude: [],
theme: { tokens: { fonts: { // Override existing tokens display: { value: "Inter Display, sans-serif" }, sans: { value: "Inter, system-ui, sans-serif" }, mono: { value: "JetBrains Mono, Menlo, monospace" },
// Add new font tokens brand: { value: "YourBrand Font, serif" }, }, }, },})Option 2: CSS Custom Properties
Font tokens reference CSS custom properties with fallbacks for flexibility:
var(--font-{name}, var(--font-{family}, {fallback})):root { --font-display: "Custom Display Font", sans-serif; --font-sans: "Custom Body Font", system-ui, sans-serif; --font-mono: "Custom Mono Font", Menlo, monospace;}Cerberus provides a comprehensive set of text styles that combine font families, sizes, weights, and spacing to create consistent typography patterns.
Text Style Categories:
How to Use Text Styles:
Text styles can be applied using the textStyle prop on Text components or through PandaCSS:
// Using Text component<Text textStyle="heading-lg">Large Heading</Text>
// Using Cerberus Primitive<cerberus.p textStyle="body-md">Body Text</cerberus.p>
// Using CSS function<p className={css({ textStyle: 'body-md' })}>Body text</p>Customization:
On this page