Skip to content
← All articles

Noa Lindqvist /design systems 8 min

Shipping a component library people can copy

One .tsx and one .css file per component, no internal imports, tokens as CSS variables: the boring rules that make a kit easy to adopt.

  • #react
  • #design-systems

Most teams do not want another dependency. They want a good dialog they can paste into their codebase and own.

Self-contained files

Each component is a pair of files with no imports from the rest of the kit. Shared decisions live in CSS custom properties, not in a JavaScript theme object.

Tokens first

:root { --c-bg: #fff; --c-text-1: #000; --r-md: 12px; }
[data-theme='dark'] { --c-bg: #050505; --c-text-1: #fff; }

Switching theme is an attribute change. Even the 3D scenes read the same tokens and redraw.