A design system that’s surprisingly hard to actually use

A couple months ago, while working on ADWAIS, I found myself inspired by the Material Design 3 design system but increasingly frustrated by m3.material.io itself.

Google has done an excellent job of explaining how to properly use the design system: when to use it, when to deviate, how to (theoretically) design with it, good and bad examples of use, etc. The biggest limitation appears when you try to actually transition from theory to practice in development environments that don’t have first-party support.

This is especially true for the web, and even more so when you’re trying to use the design system inside a framework they’ve never officially supported at all (e.g. React, raw HTML/CSS, etc…).

My first real exposure to all of these issues came while I was iterating on the UI for ADWAIS. I wanted to settle on a unified design system and apply certain elements of MD3 without making all of the app strictly based on MD3 styles or components. All I really needed was to add and replace some styling that, up until this point, had mostly been implemented with base Tailwind classes.

I thoroughly read the material.io documentation and had a decent mental image of how I wanted things to look, but it was starting to get tiring moving back and forth between slowly hydrated pages with even slower table hydrations. It was even more tiring to navigate between visual examples of various component states and the corresponding (nested) token tables just to slowly learn which tokens corresponded to which final “visual output”.

I could’ve just read the token tables directly, but the goal was to learn the why and how of the system so I could apply it inside a framework that wasn’t officially supported.

The problem was that even once I mostly, sort of, understood the system, getting the actual data needed to implement it was surprisingly annoying.

MD3 on the web is kind of a mess

The actual tokens on material.io are gated behind lazily loaded JSON payloads spread across various pages (although always under a /specs/ slug). It takes a surprisingly long time after a page loads for the token tables to actually appear, and there can also be multiple tables per page: one at the top, one at the bottom, another halfway through an otherwise very tall page.

Google does provide more consolidated tooling but almost all of it is through Figma.

The older Material Theme Builder exists both as a web tool and Figma plugin. The web version is primarily about creating and exporting Material 3 themes (dynamic color, brand colors, typography, etc…). The Figma plugin goes further and can generate Material Design tokens as Figma styles and export theme data/code but the repository itself was archived on July 23, 2026.

There is also the newer Material 3 Design Kit in Figma, which contains Google’s actual component library, variables, styles, and newer Material 3 updates. If you’re simply a designer then you’re most likely already tapped into that ecosystem, fine. But if you’re trying to consume MD3 programmatically, use it in a web project, write your own implementation, let an agent implement it for you, whatever, having Figma as the main distribution channel feels quite bizarre.

The problem is that there (as far as I’m aware!) isn’t really a clean, current, machine-readable source of truth outside of the design tooling itself available to the general public. There’s no equivalent canonical JSON package, repository, or API you can just pull into a project and work from directly.

Meanwhile, Material Web (components) went into maintenance mode on June 10, 2024, meaning they’ll only provide security updates and maybe bug fixes, pending new maintainers after the original team was moved to work on an internal Wiz framework instead.

Even if you’re okay with using Web Components and old tokens (let alone the new Expressive update), the repo never got around to implementing things like cards, data tables, date/time pickers, navigation bars/drawers/rails, search, segmented buttons, snackbars, or top app bars.

Several unofficial web implementations of Material Design do exist, but they’re of varying quality, outdated, and/or lacking in other areas, making them less attractive options for new projects. For example, Material UI, which is the third-party Material Design library, still only supports Material Design 2 despite Material 3 being released in 2021. Most are also React libraries, making them irrelevant if you’d like to apply the Material Design system to any of the other 10,000 available frontend frameworks (or platforms).

A core limitation of every single third-party library, from what I’ve seen, is that they’re inherently the equivalent of a copyist trying to replicate a painting by eye. None of them are synced with upstream tokens and design system changes. If the Google design team decides to change the font weight of medium titles on web or iOS, that’ll go completely unnoticed until a library maintainer finds out four years later that the token values don’t match.

Seemingly trivial things like this may not be the end of the world, but they paint a picture of how scattered and unreliable the ecosystem is unless you develop for Google’s target platforms (Android) or use something like JetBrains Compose Multiplatform, which as of writing is still in beta for web.

Even if we look past the beta status, Compose Multiplatform doesn’t really solve the problem I had anyway. Its web UI is compiled to WASM and drawn inside a <canvas>, meaning it doesn’t behave like a regular DOM made out of typical HTML elements such as <p> and <h1>. For what I was trying to build, that brings its own compromises around accessibility, crawling and regular browser interactions (text selection, right-click menus, etc…).

So while there are technically several ways to build something Material-ish for the web, none of them gave me the design system in the way I wanted to use it or as source data in a form I could consume myself.

Then there are the tokens themselves

To illustrate how complicated it gets: Material Design 3 defines 10 different buttons, most with their own:

  • Size: Xsmall, Small, Medium, Large, Xlarge
  • Variant: Default & toggle
  • Shape: Round & “square”, morphs when pressed, morphs when selected
  • Color: Elevated, filled, tonal, outlined, text
  • Theme: Light & dark
  • Contrast: Default, medium contrast, high contrast
  • Motion scheme: Standard & Expressive
  • Platform: Android, Compose, Web, iOS
  • Audience: 1P Baseline & 3P (plus iOS-specific dark-theme elevation and weight contexts)
  • Categories: Color, opacity, length/spacing, elevation, shape, duration/motion, typography

In addition, each button has its own set of tokens for states and state transitions (enabled, disabled, hovered, focused, pressed). Both states and variants have their own sets of tokens which in turn affect the other categories. All in all, this results in about 2,213 tokens.

What’s still not defined by these tokens are things like the styling of icons and text, which you have to piece together from other pages and token tables.

What naively felt straightforward and simple quickly became extremely complicated and impossibly tedious.

Surely an agent can figure this out?

I started looking elsewhere for a JSON dump or something similar, but all I was able to find was this “Material Design 3 Skill.md”, which I thought was decently comprehensive despite not being quite what I was looking for.

Alas, I threw it at my agent (GPT 5.6 Terra/Sol) and gave it a go at achieving a small slice of what I wanted. This unfortunately turned out to be a massive failure in almost every way conceivable.

To find out why it was so terrible at writing correct MD3 components and applying the correct color scheme, I tasked it with creating a sort of “verification gallery” of components that it could iterate on, both as a way to prove it got things right and as a record of what was actually implemented and ready for use in the real app.

This too, while somewhat better, turned out to be excruciatingly cumbersome and hard to get right. Anything that became correct required at least 20 turns of extremely minute details and descriptions of how to do it correctly, defeating the entire point of an agent.

The primary constraint was that the skill.md completely lacked the breadth and depth required to get things right beyond the immediate surface details. At times it was also straight-up incorrect, outdated, or misleadingly simple, causing me to tell the agent to ignore certain details and then manually hand over specific component and style specs.

This in and of itself was also extremely inefficient, as I had to provide such specific details and instructions that it was probably 10x more work than just writing my own implementation by hand.

That led me to a slightly different theory: maybe agents aren’t particularly bad at Material Design itself. Maybe they’re bad at the part of Material Design they can’t actually see.

Agents know the theory, but not necessarily the ground truth

Split editorial plate pairing a silver-gelatin macro of hands holding brass bow-calipers around a matte vermilion disc with warm cotton drafting paper where a single vermilion hairline crosses to two offset calibration ticks

While agents have an okay-ish grasp of the overarching concepts and principles (which can be scraped from the static HTML of material.io), they’re not at all able to reliably translate this knowledge into practice since doing so depends on the tokens, which still aren’t readily available to anyone unless you build a highly specialized scraper.

To informally verify this hypothesis, I quizzed Gemini 3.8 Flash (training data cut off at Sep 2, 2026) with 42 actionable design questions spanning everything from general knowledge (guidelines & principles) to specific token knowledge. Tool calls and search were disabled.

Note that this “experiment” was very crude and not necessarily representative of LLM capabilities. Please take it with a heavy grain of salt.

Performance by Component & Category

Component & RoundTotal QuestionsGeneral Knowledge AvgToken Knowledge AvgTotal Combined Average
Buttons (Round 1: Scenarios & Tokens)119.42 / 10 (94.2%)5.80 / 10 (58.0%)7.77 / 10 (77.7%)
Buttons (Round 2: Lineage & Derivation)119.00 / 10 (90.0%)8.33 / 10 (83.3%)8.64 / 10 (86.4%)
Buttons (Combined Rounds 1 & 2)229.23 / 10 (92.3%)7.18 / 10 (71.8%)8.20 / 10 (82.0%)
Sliders (Round 3)103.90 / 10 (39.0%)6.00 / 10 (60.0%)4.95 / 10 (49.5%)
Button Groups (Round 3)106.70 / 10 (67.0%)2.90 / 10 (29.0%)4.80 / 10 (48.0%)
TOTALS / MACRO AVERAGE427.36 / 10 (73.6%)5.88 / 10 (58.8%)6.62 / 10 (66.2%)

Looking at the data, we can see that it scores well on information that’s deeply reinforced across various pages and on the core principles of the system, but as expected, it scores terribly on token knowledge.

It clearly knows the theory, but is only really able to recall high-level UX/UI logic that’s widely applicable and core to the design system. Whenever it lacked ground truth for geometry tokens, component-specific details, and more novel concepts like new components/styles, it would (instead of just admitting it didn’t know) automatically fall back to general web/W3C guidelines and heuristics, old M2 specs, or completely overgeneralized system primitives that lacked the nuance certain components (and states) require.

Fine, I’ll get the tokens myself

After wrapping up the work on ADWAIS, I wondered if there was anything I could do to make working with MD3 on the web easier for myself and/or agents.

For anything to work, the issue of having readily available tokens had to be addressed before anything else.

Since Google didn’t offer a convenient method, I unfortunately had to do it myself…

I therefore decided to build a crawler.

Proving it was possible

My initial attempt at just fetching the HTML with cURL didn’t work because the tables were lazily loaded. I then opted for JavaScript and Playwright (headless Chrome), which indeed turned out to work.

The way it more or less worked was by discovering all /components/ pages from robots.txt/sitemaps, navigating to those, and following same-origin links under /components/.

Once on a page, it would wait and listen for a TOKEN_TABLE[...].json, record each page’s status and title, and store any discovered payload URL. It would then fetch each unique JSON payload outside the browser, gzip it into a content-addressed cache, and write a manifest for the run.

Turning the scraper into a reproducible pipeline

1848 Jacquard loom mechanism engraving centered over a horizontal warm-ivory and pale-sage drafting paper split with a single vermilion ink path traced from needle to falling warp thread

Once I had proved this was feasible, I transitioned to writing a more comprehensive pipeline in Go using chromedp (Chromium DevTools Protocol). Each run now produced versioned snapshots containing source payload details, coverage information, captured data, and checksums. Crawling was also separated from processing and publishing, so captures could be verified and compared offline before anything was exposed externally.

A page could successfully return HTTP 200 while the expected token payload never arrived. Payload requests could fail independently. Some pages exposed multiple payloads. Some simply loaded very slowly. To solve this I had to separate the idea of “the page loaded” from “the expected data was actually observed”. Failed pages can be retried without throwing away successful results from an earlier run, and cached payloads are verified against their recorded hashes before reuse and fetched again if they’re missing or corrupt.

After regularly running the crawler for a few weeks it became apparent that it required further hardening to separate two different types of changes:

  • Structural: Payload URLs/hashes, original records, page coverage, failures, and lifecycle notices.
  • Semantic: Contextual token values, reference dependencies, and selected descriptive fields, excluding volatile internal version IDs.

Up until this point, comparison relied entirely on the upstream record IDs, payload URLs, and record order. A new release would change IDs and occasionally move a payload to a new URL or reorder its records, making it appear as if tokens had been removed and added again even though their semantics hadn’t changed. Matching tokens by name, context labels, values, and reference trees instead gives the system a consistent view of what changed and what didn’t despite the structure around it being different.

Okay, now what?

After ingesting the upstream payloads which used custom/internal JSON schemes and converting that to the DTCG standard governed by W3C I now had a very reliable way of ingesting tokens, but was unsure what to actually do with it.

My original plan was to write a compiler of sorts that would create standardized MD3 React components (hence the fanatic desire for provenance and paper trails), but my interest in design engineering had slowly faded away.

I instead chose to host it as a web service where other designers and developers could easily discover and download tokens. To keep things simple, without introducing yet another language, I went with htmx, Go, and templ. The server is self-hosted on my Debian homelab and exposed publicly through a Cloudflared tunnel.

The pipeline has also become more autonomous and runs once per week to detect any upstream changes. If something looks odd, it sends me an email telling me to verify it.

It’s particularly useful for agents as everything is server rendered, supports markdown responses, and a read-only/no credentials needed HTTP MCP server + API that allows humans or agents to get the tokens in whichever form fits best.

Actually, I’m not satisfied yet.

Before the pipeline was 100% done I had already built a non-MD3 UI, but the question of “why don’t I use the MD3 design system for a site about MD3?” inevitably crossed my mind.

I then prompted an agent (5.6 Sol) with nothing but:

“design the page and components using the live tokens. i dont want to see any arbitrary styling unless it’s something that material design doesnt define”

Oh, this is actually quite nice.

The first iteration, using nothing but raw HTML and CSS, was already so much better than anything any agent had been able to produce in React with an allowance of many, many more iterations and visual examples.

Now, the site was by no means perfectly true to spec but it definitely achieved the desired “look”. It also needed some nudging to actually use all tokens available, not just the tokens and styles it thinks a component may need.

Even adding things like runtime selection of color schemes, contrast levels, and light/dark mode (which then combines with the different contrast levels!) was extremely trivial and only required a couple lines of JavaScript.

This night and day difference was so surprising and almost a bit absurd knowing how much work it previously had taken to get worse results. Turns out that giving the model access to the underlying design data helped more than spoon-feeding it small slices of tokens, Material Design docs, and hyper specific directions ever did.

Writing a component library shouldn’t be that hard, right?

Seeing what was now possible with the use of design tokens I took it upon myself to build a ✨Web Component Library (Forge), but not just for any language or framework. React? Vue? Svelte? Hah. It had to be built in Go and Templ, of course. Jokes aside, Go and Templ (with Vanilla.js) while unconventional is pretty robust as is, so no complaints there.

What was and will remain as a PITA is that tokens are just one part of the equation. Even with a full collection of tokens, they naturally cannot be used to express every visual or behavioral aspect of a component. There’s no platform agnostic way to express the behavior of flexbox, how a component should be positioned, and how a navigation rail collapses into a bar.

You can’t expect “basic measurements” to be tokenized either. About half (16/37) of the MD3 components have sizing, padding, or color-role mappings that only exist inside static measurement diagrams.

To illustrate this divide even further, of all the ~6000 CSS declarations in Forge, roughly half are still hand-authored. Over 80% of that manual CSS is layout, positioning, resets, and transitions. To give Google credit where credit’s due, I’ve only been able to catch 7 tokens that are irrefutably wrong. With that said, there’s still a plethora of contradicting information.

Exhibit 1: Menu measurements

Vertical menu padding and size measurements

The group padding says 4dp, menu item leading/trailing space says 12dp, plus a 32dp section label row with 12dp inset. Meanwhile the actual tokens say:

  • md.comp.menus.group.padding = 2dp
  • md.comp.menus.menu-item.leading-space / trailing-space = 16dp, and the section-label tokens only define text color (zero height or inset tokens).

Exhibit 2: Navigation bar

Navigation bar padding and size measurements

The diagram shows a 4dp vertical gap between the indicator and label, 20dp horizontal active-indicator trailing padding, and a flat container. Meanwhile the actual tokens say:

  • md.comp.nav-bar.item.vertical.container.between-space = 6dp
  • md.comp.nav-bar.item.horizontal.active-indicator.trailing-space = 16dp
  • md.comp.nav-bar.container.elevation = 3dp

Exhibit 3: Plain tooltips | Table vs. diagram math

Plain tooltip padding and size measurements

The table says Container height: 24dp and Padding: 8dp, without specifying whether that’s horizontal or vertical. Since the label line-height is 16dp, applying 8dp vertical padding gives you 32dp, which obviously doesn’t fit in 24dp. The diagram only marks 8 on the left and right edges, leaving you to infer the 4dp top and bottom padding yourself.

And all of this is just CSS! Of Forge’s hand-authored code (26.1k LoC), only ~37% is CSS. You still need ~2.2k lines to construct the component DOM markup without any styling, and ~5.4k lines of JS/TS just for the components to behave correctly. I’ll just drop the table below.

LayerFilesLines
Component CSS (styles/ + foundations/)509,597
JS/TS behaviors & helpers (interaction, popups, keyboard, motion)315,392
Token-to-CSS generators & asset bundlers (applying tokens -> CSS/bundles)132,788
Browser conformance tests + fixtures992,721
Markup templates (.templ)322,242
Go component API & wiring (non-generated .go)362,052
React adapters (forge/react/)81,326
Total Forge (hand-authored)26926,118

The funny part is that the crawler previously described ended up being less than 10% of the repo’s total hand-authored code. Forge and Catalog took nearly 80%. In the end Forge also grew to include a React adapter built on React Aria, dogfooded by the need for a reactive component library in TokenFoundry (a tool to bridge the gap between internal designers, brand ownership, and day-to-day operations with external development teams). Forge’s Go/Templ components and static exports are also used in Material Motion Lab, a tool to both measure the (often undisclosed) motion curves that Google uses in their component implementations, and verify my own implementation across different devices and browser engines.

All of that, along with the crawler internals and how far you can push SSR performance on a read-only catalog, is way too much for one post, so I’m saving those for separate write-ups.

Tokens still aren’t a designer, obviously

As we’ve now discovered, the MD3 design system, just like any design system, is by no means perfectly “systemized” or “autonomous” in the sense that there’s a hard rule for everything and a deterministic outcome for every scenario.

The guidelines are just that: guidelines. They operate on a case-by-case basis. Google almost always phrases them as “should be this way” rather than “it has to be this way”.

The point is that even with all the tokens available, there are still scenarios where you as the designer have to make decisions based on your own subjective taste.

You’re the one who has to decide where a segmented button group should be used and whether the buttons in the group should be filled or tonal. You’re the one who has to decide whether a horizontal slider fits better than a vertical slider. The tokens don’t make those decisions but they do remove a giant amount of unnecessary ambiguity about what the system actually defines once you’ve made them.

Apparently, that distinction matters quite a lot when the thing consuming the design system is an agent but I’d be willing to bet it helps human designers a great deal, too.

tokencatalog.dev