All projects

Design system infrastructure

A design system built from scratch to support ten projects, so one designer could prototype more, faster, and hand off closer to code.

Role
Lead Product Designer
Company
Dark Matter Technologies
Shipped
October 2024
Team
1 Senior UX Designer
A pricing question screen built entirely from library components, beside notes on design tokens, components and Auto Layout

Outcome

Jump to a section
  1. The problem
  2. The process
  3. Design tokens
  4. Creating components
  5. Using components in sprints
  6. A current-state file
  7. Exporting to code

The problem

There was no design system, and ten projects to support. The goal was a robust design infrastructure that made design more efficient and let one designer build more prototypes.

Most of the product team was new to design systems, so I gathered some of the best explanations of why they matter and reviewed them together. I wanted to show that this infrastructure would support our work and be an essential step in bridging Figma to code.


The process

A structured process kept the system consistent, scalable and efficient:

Diagram of the design infrastructure, from least efficient at the top to most efficient at the bottom: previous pages and local components, then design tokens and components, product designs, a Figma structure, current-state files and finally export to code.
From scattered local components to export-ready designs.
  1. Research and planning: what our projects needed, and industry best practice.
  2. Design tokens: colors, text styles, spacing and effects as the core of the visual style.
  3. Components: reusable, flexible pieces built on Atomic Design.
  4. Documentation: clear guidance on using every component and token.
  5. Implementation: working closely with developers to bring it into our projects.
  6. Feedback and iteration: regular reviews to keep it relevant.

Atomic Design

I organized the system on Atomic Design principles, which kept it scalable and easy to maintain.

  • Atoms: the smallest pieces, like buttons and input fields.
  • Molecules: atoms working together, like a search form.
  • Organisms: larger sections, like a header.
  • Templates: page layouts built from components.
  • Pages: templates filled with real content.

Design tokens

Tokens are the fundamental styles behind everything at Dark Matter, keeping palette and spacing consistent while staying flexible.

  • Colors: names like Primary, Secondary and Display instead of hex values, so colors and brands can change while the intent stays the same.
  • Text styles: only predefined styles, with no orphan text styles in Figma.
  • Spacing: no orphan numbers like 5, 10 or 12px; only spacing tokens, so designs fit the foundation grid.
  • Effects: predefined shadows and gradients for a consistent look.
Token sheets for colors from primary to grey, a heading and text style scale, spacing values from 4 to 80 pixels and a Bootstrap large grid.
Color, type, spacing and grid tokens.

Creating components

I already had local components from other projects, so they became the starting point. A few principles kept them consistent, reusable and efficient:

  • Auto Layout everywhere, to speed up iteration and adapt to any content or screen.
  • Variants for states, instead of duplicate components.
  • Tokens for every color, text style, space and effect.
  • No loose lines or rectangles outside exploration.
  • Clear structure: logical names and groups that reflect each component’s hierarchy.
A text field component with its parent and variants for default, focused, filled, error and disabled states.
A text field with all its variants.

Built for efficiency

Most designers don’t need to build components from scratch. A core set of well-documented, reusable components is more effective.

Library of page-level components: headers, forms, cards, banners, a background image and footers.
The core component library.
  • Auto Layout features speed up iteration.
  • Shapes are only for exploration.
  • Variants give ready-made states, so most of the app can be recreated in Figma.
  • A process for adding new components, so the library grows intentionally instead of collecting local ideas.
  • Grids based on the foundation grid keep everything aligned.

Using components in sprints

Next, the components went into real sprint work, aligning common patterns across Figma files over a couple of months.

  • Tokens for colors, text, spacing and effects across every file.
  • A central library of components that mirrored the HTML structure.
  • Auto Layout on every component, with token spacers aligned to the foundation grid.

A current-state file

I collected the most current screens from every project into one place: a single source of truth.

Figma current-state file with sections per project, each holding labeled frames of the latest screens.
The current-state file, organized by project.
  • Inventory: every screen, file and Figma design accounted for.
  • Organization: sorted by project and design stage.
  • Naming: one convention, so files are easy to find.
  • Central repository as the single source of truth.
  • Documented and reviewed, so the process can be repeated and nothing is missed.

Exporting to code

Handing off detailed Figma files and prototypes is good. Moving straight from Figma to code, with far less development overhead, is better.

Figma layer tree for a page, named to match the DOM from question flow and container down to form fields, exported through Anima to code.
Layers named like the DOM, exported straight to code.
  • Semantic layers: Figma layers that match the expected DOM, for production-ready code from a component library.
  • Flexbox and Auto Layout: the same principles, so design translates smoothly into code.
  • Tokens: one set of styling decisions, reusable across platforms.