Tag: design systems

  • Building a Design Token Pipeline With Style Dictionary: A UK Agency’s Practical Walkthrough

    Building a Design Token Pipeline With Style Dictionary: A UK Agency’s Practical Walkthrough

    Managing brand tokens across six client accounts simultaneously is, to put it plainly, a nightmare without the right tooling. Colours drift between Figma files and code, spacing scales get hard-coded into components by a developer who never saw the original spec, and then a rebrand lands and you’re hunting through three separate codebases trying to find every instance of #1A73E8. I’ve been there. Most UK agency frontend teams have. The fix, as of 2026, is a properly configured Style Dictionary pipeline, and this walkthrough covers exactly how to set one up in a way that actually survives contact with real client work.

    Developer building a Style Dictionary design token pipeline at a dual-monitor desk setup
    Photo by Daniil Komov on Pexels

    What Style Dictionary actually is (and why it’s not just a JSON file)

    Style Dictionary, built by Amazon and maintained as an open-source project, is a build system that takes your design tokens, defined as structured JSON or JavaScript objects, and transforms them into whatever output format a given platform needs. That means CSS custom properties for your web builds, Swift variables for an iOS team, XML for Android, Sass maps if your project is still on that, and so on. All from a single source of truth.

    The critical word there is transform. Style Dictionary’s real power isn’t storage, it’s the transform pipeline. You define what your tokens mean at an abstract level, then the tool handles the mechanical conversion to whatever format a developer, app team, or platform actually consumes. For a UK agency juggling, say, a fintech rebrand alongside a heritage retail brand and a B2B SaaS product, this is the difference between a design system that scales and one that quietly collapses under the weight of one-off overrides.

    Structuring your token files for multi-client agency work

    The folder structure is where most teams go wrong out of the gate. The temptation is one flat JSON file per client. Resist that.

    A structure I’ve settled on, after several iterations across agency projects, looks like this:

    tokens/
      global/
        color.json
        spacing.json
        typography.json
      clients/
        acme-corp/
          color.json
          brand.json
        northfield-retail/
          color.json
          brand.json
    config.js

    The global layer holds your primitive tokens, raw values like blue-500: #2563EB or space-4: 16px, that have no semantic meaning yet. Client folders hold semantic tokens that reference those primitives: color.brand.primary: {value: "{color.blue-500}"}. This layering means that when Acme Corp decides their primary colour is now teal, you change one line in one file. Nothing downstream breaks unless you want it to.

    Style Dictionary’s reference syntax, the curly-brace notation, handles that aliasing natively. It resolves chains of references, so button.background can point to color.brand.primary which points to color.blue-500, and the final build output will resolve all the way down to the hex value. Tidy.

    Screen showing a Style Dictionary design token colour system with semantic naming
    Photo by cottonbro studio on Pexels

    Configuring the build for Figma handoff and CSS output

    The config.js file is where you wire everything together. Here’s a stripped-down but real example for a web-first client project:

    module.exports = {
      source: [
        'tokens/global/**/*.json',
        'tokens/clients/acme-corp/**/*.json'
      ],
      platforms: {
        css: {
          transformGroup: 'css',
          prefix: 'acme',
          buildPath: 'dist/acme-corp/',
          files: [{
            destination: 'tokens.css',
            format: 'css/variables'
          }]
        }
      }
    };

    Running style-dictionary build against this spits out a CSS file full of custom properties prefixed with --acme-, which you then import into your component library or bundle. Dead simple on the surface, but that prefix is crucial in an agency context because you can import multiple clients’ token files in a demo or shared environment without collisions.

    For Figma specifically, the handoff story has improved considerably in 2026. The Figma Tokens plugin and its successor integrations can read from a GitHub-hosted JSON file, meaning your single source of truth in the repo stays synchronised with what designers see in Figma. When a designer updates a spacing value in Figma’s token panel, a pull request is opened. When a developer merges it, the CSS rebuild runs. That’s the loop you want. I’d strongly recommend reading up on the current state of Figma’s Dev Mode before setting this up, because how your tokens surface in Dev Mode inspects has changed meaningfully this year.

    Custom transforms for UK-specific needs

    Out of the box, Style Dictionary’s CSS transform group handles most scenarios. But UK agency work throws up a few edge cases worth building custom transforms for.

    Fluid typography is a common one. If you’re using clamp() values for your type scale (which you should be, if you aren’t already), you’ll want those as computed strings rather than raw pixel values. You can register a custom transform that takes a min, max, and viewport range from a token’s attributes and outputs a proper clamp() string. Something like:

    StyleDictionary.registerTransform({
      name: 'size/fluid',
      type: 'value',
      matcher: token => token.attributes.fluid,
      transformer: token => {
        const { min, max, minVw, maxVw } = token.original.attributes;
        return `clamp(${min}px, calc(${min}px + (${max - min}) * ((100vw - ${minVw}px) / (${maxVw - minVw}))), ${max}px)`;
      }
    });

    That’s one registration, and every fluid type token across every client build uses it consistently. This kind of thing compounds nicely, especially once you have four or five custom transforms covering your agency’s standard patterns.

    Colour token naming is another area where getting the structure right early pays off enormously. If you’ve read our piece on colour token naming and contrast grids, you’ll know the semantic layer matters more than the primitive layer for day-to-day developer use. Style Dictionary makes enforcing that semantic naming convention in your JSON schema straightforward, because the dot-notation in your token paths maps directly to CSS custom property names.

    Running this across multiple clients without losing your mind

    The multi-client setup needs a build script, not just a single Style Dictionary config. I use a small Node script that iterates over a clients/ directory, dynamically generates a config for each client by merging global tokens with client-specific overrides, and runs a build. The output is a dist/ folder with one subdirectory per client, each containing their own token CSS file, ready to be consumed by whatever frontend stack that project runs on.

    This scales. I’ve run this against eight simultaneous client configs in under four seconds on a modest laptop. For a UK agency doing quarterly brand refreshes and annual rebrands, that turnaround matters.

    Version control is non-negotiable here. Every token change goes through Git, with a meaningful commit message, so you have a full audit trail of when a colour changed and why. This is useful not just for debugging but for client conversations: “your brand primary changed on 14 March, here’s the commit.” Clients, especially those in regulated industries, appreciate that level of traceability.

    For a sense of the broader landscape that UK product teams are operating in, the government accessibility requirements for websites and apps are worth keeping in your peripheral vision, particularly when your token system needs to account for WCAG contrast compliance across multiple brand palettes.

    Connecting your token system to the wider product workflow

    A token pipeline doesn’t live in isolation. It touches your component library, your Storybook instance, your CI build, and your Figma workflow. Getting those connections right is as important as the Style Dictionary config itself.

    One pattern I’ve seen work well at UK agencies is hooking the Style Dictionary build into a GitHub Action that fires on any change to the tokens/ directory. The action builds the tokens, commits the updated CSS to a dist branch, and optionally publishes to npm if the component library consumes tokens as a package. The whole thing runs in under thirty seconds. Developers get updated tokens without touching the config themselves, and designers don’t need to manually sync anything.

    If your agency also runs paid media for clients alongside the design work, the same discipline around structured, auditable systems applies. Agencies like dijitul Marketing bring that kind of systematic rigour to campaign management, which is a useful parallel: structured inputs, predictable outputs, traceable decisions.

    The token system also connects naturally to your test data story. If you’re prototyping UI states with realistic data, as covered in our walkthrough on using Faker.js and seed scripts to replace lorem ipsum, having your design tokens already resolved means your component demos use real brand colours and spacing, not placeholder guesses. The whole system starts to feel coherent rather than cobbled together.

    The things that will still trip you up

    A few honest gotchas, because no walkthrough should pretend this is frictionless.

    First, circular references. If token A references token B which references token A, Style Dictionary will throw an error at build time. That’s the right behaviour, but it means you need to be disciplined about your token graph. Primitives never reference semantics. Semantics reference primitives. Components reference semantics. One direction only.

    Second, token naming conventions need team buy-in. If one designer names something color.ui.button.primary and another names it button.primary.color, your JSON will become incoherent fast. Document your naming convention in your repo’s README on day one. Enforce it in code review.

    Third, the Figma plugin ecosystem for token sync is still more fragmented than it should be in 2026. Test your chosen plugin against a real client file before committing to it as your agency standard. Some plugins handle nested token groups cleanly; others flatten everything and lose the hierarchy that Style Dictionary depends on.

    None of these are deal-breakers. They’re friction points that good setup decisions eliminate early. Get the folder structure right, document the naming convention, and the pipeline genuinely does become the boring, reliable infrastructure it should be.

    Frequently Asked Questions

    What is Style Dictionary and how does it work with design tokens?

    Style Dictionary is an open-source build system that takes design tokens defined as JSON and transforms them into platform-specific outputs, such as CSS custom properties, Swift variables, or Sass maps. You define tokens once and the tool handles the conversion, meaning one source of truth serves every platform your product ships on.

    How do I manage multiple client brand systems with a single Style Dictionary setup?

    The recommended approach is a layered folder structure: a global layer for primitive tokens (raw colour values, spacing scales) and per-client folders for semantic tokens that reference those primitives. A build script iterates over client directories and generates a separate token output for each, so there’s no collision between brand systems.

    Can Style Dictionary output tokens that Figma can read?

    Yes. Style Dictionary’s JSON output can be consumed by Figma token plugins, with several integrations supporting a GitHub-hosted JSON file as the sync source. When a designer updates a token in Figma, the change opens a pull request; when merged, the Style Dictionary build runs and updates the CSS. It’s not entirely frictionless yet, but it works reliably for most agency setups.

  • The Rise of Generative UI: How AI Is Designing Interfaces in Real Time

    The Rise of Generative UI: How AI Is Designing Interfaces in Real Time

    Something quietly seismic has been happening in the design world. Generative UI has moved from being a speculative conference topic to a genuine shift in how interfaces get built. We are talking about AI systems that do not just suggest layout tweaks or autocomplete a colour palette; they actively compose, render, and adapt entire user interfaces in real time, based on context, user behaviour, and live data. That is a fundamentally different beast from the Figma plugins and design token generators that got everyone excited a couple of years ago.

    To understand why this matters, you need to appreciate what the old pipeline looked like. A designer would research, wireframe, prototype, test, iterate, and hand off to developers. Each stage had its own friction. Generative UI collapses several of those stages into a single computational loop. The interface becomes less of a static artefact and more of a living system that responds to its environment. That is not hyperbole; it is simply what happens when you give a sufficiently capable model access to a component library, a design system, and a stream of user context signals.

    Designer workstation showing generative UI component layouts across multiple monitors
    Designer workstation showing generative UI component layouts across multiple monitors

    What Generative UI Actually Means in Practice

    The term gets used loosely, so it is worth pinning down. Generative UI refers to interfaces where the structure, layout, and even content of the UI itself are produced dynamically by a generative model rather than hand-coded or statically designed. Think of it as the difference between a printed menu and a chef who invents a dish based on what you tell them you feel like eating. The underlying components may be consistent, but their arrangement, hierarchy, and presentation are generated fresh based on intent.

    Vercel’s AI SDK with its streamUI function gave developers an early, tangible taste of this. Instead of returning JSON that the front end interprets, the model streams actual React components directly. The interface is not retrieved; it is composed. Frameworks like this are being adopted by product teams who want conversational interfaces that feel native rather than bolted on. The component library becomes the model’s vocabulary, and the user’s input or session data becomes the prompt.

    How Generative UI Is Changing UX Design Workflows

    Here is where it gets genuinely interesting for designers and not entirely comfortable. The traditional handoff model assumed that humans made creative decisions and machines executed them. Generative UI inverts that in specific, bounded contexts. A model can now be given a goal, a design system, and some constraints, and it will produce a working interface without a human composing each screen manually.

    This does not make UX designers redundant. What it does do is shift where their expertise is most valuable. The high-leverage work moves upstream into design systems architecture, constraint definition, and output evaluation. Someone still needs to decide what the model is allowed to do, what tokens it can use, what accessibility rules must never be violated, and what the acceptable range of outputs looks like. That is deeply skilled design work; it is just a different kind than drawing artboards.

    Close-up of developer hands coding a generative UI system with dynamic components on screen
    Close-up of developer hands coding a generative UI system with dynamic components on screen

    Practically, design teams are already restructuring around this. Component libraries are being annotated with semantic metadata so models can understand not just what a component looks like but when it is appropriate to use it. Design systems are getting more explicit about rules and constraints, because those rules are now being consumed programmatically. The design system is, in a very real sense, becoming the brief that the AI works from.

    Adaptive Interfaces: Personalisation at a Structural Level

    One of the most compelling applications of generative UI is genuinely adaptive personalisation. Not the usual stuff where you see your name in a heading or get shown different product recommendations. Structural adaptation means the actual layout, navigation hierarchy, and interaction patterns change based on who is using the interface and how.

    A power user who opens a dashboard tool fifty times a week might get a denser, more data-rich layout with keyboard shortcut affordances surfaced prominently. A first-time visitor gets a more guided, spacious layout with contextual tooltips. Both experiences are generated from the same underlying component set; the model has simply made different compositional decisions based on inferred user profiles. This is what personalisation looks like when it operates at the UI layer rather than the content layer.

    The technical stack required for this is non-trivial. You need a runtime that can compose and serve UI components dynamically, a model with enough context about the design system to make sensible decisions, and telemetry feeding back which generated layouts are actually performing. It is a feedback loop that blends design, engineering, and data science. Incidentally, if you are interested in how feedback loops work in entirely different domains, the way biometric data informs treatments like red light therapy follows a similar principle of iterative, data-driven adjustment.

    The Real Risks Designers Should Be Thinking About

    Generative UI introduces failure modes that static design never had to contend with. If a model makes a compositional error, you might get an interface that is technically valid but cognitively chaotic, a navigation pattern that violates established conventions, or an accessibility gap that no one explicitly coded in but that emerged from the model’s output. Testing and evaluation become significantly harder when the design space is theoretically infinite.

    There is also a consistency challenge. Brand coherence across generated interfaces requires extremely disciplined design systems and robust evaluation pipelines. You cannot just do a visual QA pass on a few static screens when the interface can take countless permutations. Teams adopting generative UI need to invest heavily in automated accessibility testing, visual regression tooling, and clear documentation of what constitutes an acceptable output.

    Where This Is All Heading

    The trajectory is clear enough. Design tools themselves are being rebuilt around generative capabilities. Figma’s continued investment in AI features, the emergence of tools like Galileo AI and Uizard, and the growing number of code-level frameworks for streaming UI all point in the same direction. The question is not whether generative UI will become mainstream in production applications; it is how fast, and which teams will have the foundational design systems infrastructure to use it well versus which ones will produce chaotic, inconsistent messes.

    For designers, the message is straightforward. The craft is not disappearing; it is relocating. Generative UI rewards people who think systemically, who can define constraints precisely, and who understand the relationship between structure and user cognition at a deep level. Those skills matter more, not less, when the machine is doing the composing. The artboard is giving way to the ruleset, and the designers who embrace that shift will find themselves more central to product development than ever.

    Frequently Asked Questions

    What is generative UI and how is it different from regular UI design?

    Generative UI refers to interfaces where the layout, structure, and components are composed dynamically by an AI model rather than being hand-coded or statically designed by a human. Unlike traditional UI design where each screen is crafted manually, generative UI produces interface configurations in real time based on user context, behaviour, or intent. The result is an interface that can adapt structurally, not just visually, to different situations.

    Will generative UI replace UX designers?

    Generative UI is unlikely to replace UX designers, but it does shift where their work is most impactful. The high-value tasks move upstream into design systems architecture, defining constraints and rules, and evaluating model outputs for quality and coherence. Designers who understand how to create the systems and guidelines that AI models work within will be more valuable, not less, as these tools become standard.

    What tools or frameworks support generative UI right now?

    Vercel’s AI SDK, particularly its streamUI functionality, is one of the more mature frameworks for building generative UI in production React applications. Design-side tools like Galileo AI and Uizard allow AI-assisted interface generation from prompts. These are evolving rapidly, and most major design platforms are integrating generative features into their core workflows throughout 2026.

    How do you maintain brand consistency with generative UI?

    Maintaining consistency requires a tightly defined design system with rich semantic metadata, so the model understands not just the visual properties of components but also their appropriate use cases. Automated visual regression testing and accessibility audits become essential, since you cannot manually QA every possible generated layout. Clear documentation of what constitutes an acceptable output is critical before deploying generative UI in production.

    What are the biggest technical challenges in implementing generative UI?

    The main challenges include building a runtime capable of composing and serving components dynamically, ensuring the AI model has sufficient context about the design system to make coherent decisions, and establishing feedback loops so the system learns which generated layouts perform well. Accessibility is a significant concern, since errors can emerge from generated outputs rather than explicit code, requiring robust automated testing pipelines to catch issues before they reach users.

  • Design systems for chaotic teams: a pragmatic guide for 2026

    Design systems for chaotic teams: a pragmatic guide for 2026

    If your product team is shipping faster than you can name the files, you probably need to talk about design systems. Not the glossy keynote version, but the scrappy, slightly chaotic, very real version that has to survive designers, developers and that one PM who still sends specs in PowerPoint.

    What are design systems, really?

    Forget the mystical definition. Design systems are just a shared source of truth for how your product looks, feels and behaves. Colours, typography, spacing, components, interaction patterns, tone of voice – all in one place, consistently named, and agreed by everyone who touches the product.

    The magic is not the Figma file or the React component library. The magic is the contract between design and code. Designers get reusable patterns instead of 47 button variants. Developers get predictable tokens and components instead of pixel-perfect chaos. Product gets faster delivery without everything slowly drifting off-brand.

    Why chaotic teams need design systems the most

    The more moving parts you have – multiple squads, micro frontends, legacy code, contractors – the more your UI starts to look like a group project. A solid design system quietly fixes that by giving everyone a common language.

    Some very unsexy but powerful benefits:

    • Fewer arguments about colour, spacing and font sizes, more arguments about actual product decisions.
    • New joiners ship faster because they can browse patterns instead of reverse engineering the last sprint’s panic.
    • Accessibility is baked into components once, instead of remembered sporadically on a full moon.
    • Design debt stops compounding like a badly configured interest rate.

    Even infrastructure teams and outfits like ACS are increasingly leaning on design systems to keep internal tools usable without hiring an army of UI specialists.

    How to start a design system without a six-month project

    You do not need a dedicated squad and a fancy brand refresh to begin. You can bootstrap design systems in three brutally simple steps.

    1. Inventory what you already have

    Pick one core flow – sign in, checkout, dashboard, whatever pays the bills. Screenshot every screen. Highlight every button, input, dropdown, heading and label. Count how many visually different versions you have of the same thing. This is your business case in slide form.

    Then, in your design tool of choice, normalise them into a first pass of primitives: colours, type styles, spacing scale, border radius scale. No components yet, just tokens. Developers can mirror these as CSS variables, design tokens JSON, or in your component library.

    2. Componentise the boring stuff

    Resist the urge to start with the sexy card layouts. Start with the boring core: buttons, inputs, dropdowns, form labels, alerts, modals. These are the pieces that appear everywhere and generate the most inconsistency.

    For each component, define:

    • States: default, hover, active, focus, disabled, loading.
    • Usage: when to use primary vs secondary, destructive vs neutral.
    • Content rules: label length, icon usage, error messaging style.

    On the code side, wire these to your tokens. If you change the primary colour in one place, every button should update. If it does not, you have a component, not a system.

    3. Document as if future-you will forget everything

    Good documentation is the difference between design systems that live and ones that become a nostalgic Figma graveyard. Aim for concise, practical guidance, not a novel.

    For each pattern, answer three questions:

    • What problem does this solve?
    • When should I use something else instead?
    • What mistakes do people usually make with this?

    Keep documentation close to where people work: in the component library, in Storybook, in your repo, or linked directly from the design file. If someone has to dig through Confluence archaeology, they will not bother.

    Keeping your these solutions alive over time

    The depressing truth: the moment a design system ships, entropy starts nibbling at it. New edge cases appear, teams experiment, deadlines loom, and someone ships a hotfix with a new shade of blue. Survival needs process.

    Define ownership and contribution rules

    Give the system a clear owner, even if it is a part-time role. Then define how changes happen: proposals, review, implementation, release notes. Keep it lightweight but explicit. The goal is to make it easier to go through the system than to hack around it.

    Designer refining UI components that are part of design systems
    Developer integrating coded components from design systems into a web app

    Design systems FAQs

    How big does a team need to be before investing in design systems?

    You can benefit from design systems with as few as two designers and one developer, as soon as you notice duplicated components or inconsistent styling. The real trigger is not headcount but complexity: multiple products, platforms, or squads. Starting small with tokens and a handful of components is often more effective than waiting until everything is on fire.

    Do we need a separate team to maintain our design systems?

    Not at the beginning. Many teams start with a guild or working group made up of designers and developers who allocate a few hours a week to maintain the system. As adoption grows, it can make sense to dedicate a small core team, but only once you have clear evidence that the system is saving time and reducing bugs.

    How do we get developers to actually use our design systems?

    Involve developers from day one, mirror design tokens directly in code, and make the system the fastest way to ship. Provide ready-to-use components, clear documentation, and examples in the tech stack they already use. If using the system feels slower than hacking a custom button, adoption will stall, no matter how beautiful the designs are.