Elena de Gregorio®
Available for 2026
EN ES

Work / Front-end / EdG Design System

This portfolio, taken apart into 37 pieces

The component library holding this site up, taken out and published as what it is: HTML, CSS and JavaScript ready to copy. No frameworks and no build step. Every component carries a working example and the exact code rendering it.

Design system in code · Living documentation — 2026

Project 12 of 28 in the archive 03 of 08 in Front-end development See the whole discipline ↗

The EdG Design System documentation site: the discipline card page, showing the three colour blocks for UX, front-end and graphic

Client

EdG Studio · Elena de Gregorio

Discipline

Front-end development

Year

2026

Role

System architecture, CSS, JavaScript and documentation

Scope

37 components · 7 groups · 57 tokens · 12 icons · 2 languages

Stack

Semantic HTML · CSS custom properties · browser JavaScript

Deliverable

The library (css/ + js/) and a self-contained documentation site

Where it comes from

The audit and the Figma that decided it ↗ · and these tokens, printed ↗

The whole library

Open it and use it: 37 components with their code ready to copy

The complete documentation site, with the search, both themes and the three widths. It opens in a new tab and carries its own button back to this page.

(01) — Why it exists

A design system that only lives in Figma is not a system

The audit of this portfolio ended in a Figma file with the palette, the type ramp and the components put in order. That is exactly where most design systems die: handsome on the canvas and never translated into the browser.

Nobody building a page opens Figma to find out how many pixels a radius is. They open the inspector on another page and copy. And by the third copy the system no longer exists.

So the system was written in code: the same tokens, the same components and the same states, in files you can link to. This site is built with them, and the library is the proof.

37

Documented components

In seven groups, from foundations to form
57

Tokens in tokens.css

Colour, type, spacing, radii and motion
1,585

Lines of library

200 tokens · 1,068 components · 317 JS
2

Complete themes

Canonical dark and light, without duplicating a component

The rule that decides everything else

No component has a colour or a size written by hand. They all read variables from tokens.css. Change one token and the whole library changes — and that is what separates a system from a folder of snippets.

(02) — How it is built

Three ideas and not one exception

A small system survives if it has few rules and breaks none of them. These are the three, and they are written in the README before they are written in any component.

01 · Everything comes from the tokens

The tokens are semantic, not descriptive: --bg, not “black”. That allows two complete modes — canonical dark and light — without duplicating a single component. Watch out for light: the main accent is not the green, it is blue #1f4dff, and text on accent turns white.

Figma · 01 Foundations — Palettecss/tokens.css

The Colour page of the documentation: the swatches for surface, text, accents and disciplines, each labelled with its token name
Documentation · Foundations · ColourBoth modes, in semantic tokens

02 · The accent is inherited

Putting data-disc="ux | front | graphic" on a component — or on any ancestor — reassigns --accent, and with it the rule, the chip, the dots and the hover states of everything inside. One attribute on a section recolours the whole section.

It is the reason the work archive can paint three disciplines with a single set of components instead of three.

Three accents · UX · Front · GraphicOne single component

The archive row page: three projects, each with its discipline chip in its own colour, and below them the HTML that generates them
Documentation · Collections · Archive rowThe same markup, three accents

03 · The responsive lives in the tokens

Figma defines three measurement modes — Desktop 1440, Tablet 834 and Mobile 390. In code they are two media queries in tokens.css that rewrite the type ramp and the spacing. Nothing else.

Components only add media queries when they change structure: the header brings out the burger, the footer collapses columns, the archive row stacks. Everything else comes down on its own.

Breakpoints · ≤900px · ≤620px--t-h2 86 → 59 → 40

The work bar page with its two frames: the same component at desktop width and at 390 pixels, with its code below
Documentation · Structure · Work barTwo real widths, not a simulation
(03) — The documentation

The example and the code are the same file

The classic trap in documenting components is that the example is drawn by hand and the snippet is written separately: by the third change, both are lying. Here the catalogue’s HTML is at once what gets rendered and what gets copied. If the example works, the snippet is right. There is no way for them to disagree.

And every example is painted inside an iframe with its own viewport, loading exactly the same tokens.css, components.css and edg-ds.js that get handed to the team. Being a real width, the media queries respond: the Desktop / Tablet / Mobile buttons show the actual behaviour, not a mock-up of it.

The button page: the six variants working at the top, the highlighted HTML below with the HTML and CSS tabs and the copy button
Documentation · Controls · ButtonLive example + HTML / CSS / JS + copy

What every page carries

The component name, its classes, the exact Figma node it comes from, a description of what it is for, the variants table as it stands in the design file, the example with all its combinations, and the code in three tabs: the markup, the real block from components.css, and the JavaScript you need to call, if you need any.

The CSS shown is not a copy: it is read from the /* @c: id */ … /* @end */ markers in the components file itself at build time. That cannot fall out of sync either.

The typography page: the full ramp in Archivo, JetBrains Mono and Instrument Serif, with the three sizes of every step annotated
Documentation · Foundations · TypographyEleven steps · three sizes each
(04) — Themes, states and accessibility

State lives in ARIA, not in loose classes

The chips, the view switch and the language switch carry their state in aria-pressed; navigation in aria-current="page"; the burger and the accordion in aria-expanded; the archive counter in aria-live. The CSS hooks onto those attributes. A component cannot look active without being active, because the same attribute paints it and announces it.

The rest follows: decorative icons with aria-hidden, a dedicated :focus-visible ring in the accent, and the marquee, the pulse and the drawn rules all stopped under prefers-reduced-motion.

The filter chip page in light theme: the four chips at rest and active, with the blue accent of light mode
Light modeBlue accent #1f4dff
The form field page: the empty, filled and error states frozen, and below them a form that really validates
Form fieldEmpty · filled · error · validating

One logo, one file

The brand mark is not placed as an image but as a mask: the file lives in the --logo token and the component paints it with background: currentColor. A single file goes white on dark, black on light and takes the discipline accent when it has to, without maintaining three versions of the same logo.

The library, working

The whole documentation site is right below: search for a component, switch its theme, narrow the example to tablet or mobile and copy the code. Everything you see is the library using itself.

A frame is a good place to prove something exists and a bad place to use it. To go through it properly, open it in a tab — and from there, the Back to the portfolio button in the top bar brings you straight back to this page.

EdG Design System — 37 components

Where it comes from

This project has three parts and they live in different disciplines. The diagnosis, the research and the design of the system are in the product UX/UI page: the audit of this portfolio. What you are reading is the second: that system written in code and documented so somebody other than me can use it. The third takes it off the screen: the business card, printed in these same tokens.

The control on the right jumps between the two.

Next in Front-end development

Kacho Cano