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.






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.


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

- 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.


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.


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.


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.


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.


Getting started: from npm install to a first page 

Icons: one grid, one component 

Ratio: the weights you write become the lanes 

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


- 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