Next.js projects span server and client boundaries. Design tokens need to work in both — CSS variables for Server Components, theme objects for Client Components, Tailwind config for utility classes. A designtoken.md gives your coding agent the complete token system so it generates consistent UI across your entire Next.js app.
CSS custom properties defined in your global stylesheet, sourced from designtoken.md's color scales and typography. No JavaScript runtime cost. Your agent generates className with CSS variable references, keeping server components lean and predictable.
When you need dynamic theming, the agent reads designtoken.md and generates theme providers, context values, or CSS-in-JS tokens. Full scale awareness means no magic numbers. Your Client Components can switch themes at runtime while maintaining design fidelity.
The default styling in Next.js projects. designtoken.md's generator outputs Tailwind-compatible config. Your agent reads the markdown for semantic intent and generates utility classes: bg-primary-500, text-heading-lg, space-y-md.
Drop designtoken.md in your project root. Any coding agent reads it automatically as project context. No imports, no build steps, no config.
With tokens, your agent generates semantic references instead of magic numbers.
| Aspect | Without tokens | With designtoken.md |
|---|---|---|
| Colors | Hardcoded hex: #3B82F6, #1E40AF, #EFF6FF | Semantic references: primary-500, primary-800, primary-50 |
| Typography | Arbitrary sizes: 16px, 20px, 14px | Semantic scales: heading-lg, body, caption |
| Spacing | Magic pixels: 8, 16, 24, 32px | Named tokens: space-sm, space-md, space-lg |
| Component states | Guessed hover/focus colors | Defined state tokens: primary-600, primary-700 |
| Consistency | Variable across pages | Locked across entire app |
Create a rich designtoken.md for your project, free, no signup.
Start generating →