Tessellate · 2024
Tessellate
Three product teams had three sets of colours, three spacing scales and no way to ship a theme. I built the pipeline that made one set of tokens real.
Challenge
Tessellate had grown from one product into three, each with its own component library forked from the first. A colour change meant three pull requests and a week of visual QA. Marketing asked for a dark theme and the honest answer was that it would take a quarter.
The teams were not careless. They had no shared definition of what a colour was, so every product invented one.
Approach
I put the tokens in one JSON source with three tiers: primitives, semantic aliases, and component tokens. Style Dictionary generates CSS variables, TypeScript types and the Figma variables file from the same source, so a designer changing a value and an engineer changing a value produce the same diff.
Then the migration. I wrote a codemod that rewrote hardcoded values to semantic tokens, ran it product by product behind a feature flag, and made the visual diff part of CI so a token change that altered a screenshot failed the build instead of reaching a customer.
The dark theme was the proof: once tokens were semantic, it was 40 lines of variable overrides rather than a rewrite.
Result
All 214 components now come from one source. Build time for the shared library fell from 5 minutes 40 to 38 seconds after the token build moved out of the webpack pipeline, and the three products ship the same theme in the same release.
A colour change is now one pull request reviewed by one designer. The dark theme shipped in nine days.
“We stopped arguing about hex values in review and started arguing about the product, which is the correct thing to argue about.”Tomas Lind, VP Product, Tessellate
Stack
React 18, TypeScript, Style Dictionary, Storybook with Chromatic for visual diffs, GitHub Actions, pnpm workspaces.