Semantic tokens
Treat JSON tokens as the source of truth. Consume colour roles such as primary, ink, surface and paper rather than copying literal values into components.
Developer documentation
A practical reference for translating your generated tokens into accessible, secure and maintainable digital products.
Treat JSON tokens as the source of truth. Consume colour roles such as primary, ink, surface and paper rather than copying literal values into components.
Use the display family for H1–H3 and the body family for paragraphs, controls and labels. Preserve the supplied line heights and load local fonts with font-display: swap.
Build on the 4px base: 4, 8, 16, 24 and 48px. Use 24px between related groups and 48px or more between distinct sections.
Validate user-supplied tokens before applying them. Never expose server secrets through NEXT_PUBLIC variables, never build class names from untrusted input and retain the font licence.
Token contract
Import the generated CSS before application styles. Map tokens to framework utilities once, then reference semantic roles throughout your component layer.
:root {
--brand-primary: #7A5A3A;
--font-display: "Space Grotesk", sans-serif;
--space-md: 16px;
}Next.js starter checklist