Extract design tokens for a Next.js application
Overview
Extract a live site's tokens and generate a Next.js-compatible token file. CSS custom properties for the App Router, Tailwind theme extension, and typed TypeScript constants.
Next.js projects using the App Router typically define design tokens in CSS custom properties in globals.css, alongside a Tailwind theme. Generate the Tailwind half directly with `--tailwind`, which writes a v4 @theme file from the extraction, then ask an agent for the two outputs measurement cannot produce on its own: a CSS variables block for globals.css and a typed tokens.ts for use in TypeScript components. All three reference the same extracted values. On a Tailwind v3 project, ask the agent to convert the @theme block into a theme.extend config instead.
Extract tokens
Write the Tailwind theme
theme.css + globals.css + tokens.ts, a complete Next.js token setup from a live brand.
More in Code & Tokens
Browse all
All recipes →
Continue reading
Getting started
Install Dembrandt and turn any public website into a complete set of design tokens in under 2 minutes. All you need is Node.js and a terminal.
MCP
Use Dembrandt as a tool inside Claude Code, Cursor, Windsurf, or any MCP-compatible editor. Your agent extracts live design tokens automatically when you ask.
Skills
30 UX and design system skills for AI agents. Install once, your agent designs with hierarchy, WCAG standards, and brand accuracy. The UX knowledge that normally costs senior consultant days.