dede

Code-first design system: edited in code and published on npm, with tokens, layout and a growing library of components that this site is built on.

dede.style: the home page on a desktopdede.style: the home page on a desktop
dede.style: the home page on a tabletdede.style: the home page on a tablet
dede.style: the home page on a phonedede.style: the home page on a phone

Overview

dede is a code-first design system. The name is the idea: design and develop as one continuous workflow, rather than two deliverables that drift apart. It exists to design and build a system end to end, in one place.

Design tokens, layout primitives and components, documented by a site built from those same components, and published on npm as @dede-style/ui.

Role
Creator · Senior Product Designer
Scope
Code-first design system · Design tokens · Component architecture · AI-assisted development
Duration
Currently brewing
Location
Remote

Challenges

A design system usually lives twice: once in a design tool and once in code. The two drift, and the documentation drifts from both.

The aim was one system, edited in code, whose documentation cannot disagree with it because it is made of it.

Instead of Storybook or a token editor, both are built into the documentation: every component page has live controls and the code they produce, and tokens are edited in code, by hand or with AI.

dede.style: the Button's Properties tab, the variant set to destructive and the code showndede.style: the Button's Properties tab, the variant set to destructive and the code shown
A control changed: the button and its code change with it

Role

Architect, responsible for every design and product decision across dede. Claude, an AI model, wrote most of the code, directed and challenged throughout.

VS Code: dede's Image ticket open beside Claude Code, where a proposal for two ratios is argued through
The Image component, debated with Claude: one ratio and an overflow switch, or a ratio each for the image and its frame. Two ratios won, so each setting does one job.
No Storybook
No token editor either. The documentation is the workbench, so it cannot fall behind the code.
Layout in the system
Not only colours and components but also structure, similar to the grid that Bootstrap provides: every page is built from the same few layout parts.
Every rule enforced
Written rules became checks and tests, so the system keeps them without anyone having to remember.
Decisions debated
Directing meant debating decisions, not only approving them: Claude's proposals were challenged, and changed where a better answer was found.

Solution

Three layers, built in order, each documented by the components it makes possible.

Tokens

Roles are the public API: colours are named for their job, never their hue. Light and dark are modes of one system, not two themes, and every text colour is set by contrast and checked on each build.

dede.style: the surface colours, light and darkdede.style: the surface colours, light and dark
Surfaces: one role, a step in each mode

Layout

Four primitives, each answering one question: Section is the band, Stack arranges lanes, Slot holds a lane, Sleeve spaces what sits in it. Fluid spacing sets the page's rhythm; fixed spacing sets the content's.

dede.style: the Stack page, with a Section, a Stack and three Slots drawn to scaledede.style: the Stack page, with a Section, a Stack and three Slots drawn to scale
Stack: lanes inside a band, drawn to scale

Components

Each component has an Overview of its decisions and a Properties tab with live controls. The code shown beside them is generated from the same values, so the example and the code cannot disagree. Decisions rest on research, not taste: a field's hint sits above the input, read before typing and never hidden by a phone's keyboard, so an error below moves nothing.

dede.style: the Table component's Overviewdede.style: the Table component's Overview
Table: the element already knows how to be a table

Testing & Iteration

Static checks and browser tests gate every push. The rule against wrappers that do nothing shows why: restated in prose, its check found a redundant Slot around a Grid the same day.

Accessibility is checked, not assumed. Every colour pairing is verified against WCAG AA contrast on each build, a check written after a text colour at 2.40:1 went unnoticed across eight pages, and the tests drive every component by keyboard and find it by its accessible name.

dede.style: the Field page beside a Lighthouse report scoring 100 for accessibility and best practicesdede.style: the Field page beside a Lighthouse report scoring 100 for accessibility and best practices
Lighthouse on the Field page: accessibility 100

Product highlights

Published as @dede-style/ui, with a generated DESIGN.md and llms.txt, so an agent can build with it from outside as well as a person.

  • dede.style: Getting started, from npm install to a first pagedede.style: Getting started, from npm install to a first page
    Getting started: from npm install to a first page
  • dede.style: the icon setdede.style: the icon set
    Icons: one grid, one component
  • dede.style: the Ratio pattern, unequal weights drawn to scaledede.style: the Ratio pattern, unequal weights drawn to scale
    Ratio: the weights you write become the lanes
  • dede.style: the Select component's Properties tabdede.style: the Select component's Properties tab
    Select: live controls, generated code

Impact

A design system that documents itself, gates its own changes, and is used from the outside by a real site.

This site is built on it

This site's Home, built on dedeThis site's Home, built on dede
This site, built on dede
  • Documentation that cannot drift: built from the components it documents
  • Every change gated by 177 automated tests and eight checks
  • Four releases in eight days, shaped by this site's use
  • Built for agents as well as people: DESIGN.md and llms.txt let an agent build with it from outside