Skip to content

Personal project

Rillmark: a React component library with a tested release path

48 React 19 components whose look switches between three presets with two HTML attributes. The documentation site has live previews, generated API tables and five example apps running on sample data.

Problem
A component library has to work when someone installs it, not only in its own demo site, and it should not need a theming layer just to look different.
My part
I built the library, its documentation site and its release checks, and I publish it under my npm account.
Result
Published on npm as version 0.2.0, with a live documentation site and five example apps. I know of no projects using it yet.

What is in it

48 React 19 components. 26 of them import Radix primitives directly, most of them for focus, keyboard and positioning behavior. The rest are native HTML or small pieces of logic, such as a form field that wires up labels and errors for eleven controls. The combobox adds its own listbox logic on top of a Radix Popover. It started as a shadcn-style component registry and moved to a normal npm package in its first days. Token names and most component part names still follow shadcn's conventions; the values, shapes and motion are specific to Rillmark.

rillmark.bereket.devLive site

Rillmark documentation page titled Same components, new character, with three preset cards named Fieldnotes, Studio and Play.
One component set, three presets. Choosing one restyles the whole documentation site.

What the design trades off

Decision

Two HTML attributes instead of a theme provider.

Why
One tokens file generates CSS for three presets in light and dark. Setting data-rillmark-preset and data-rillmark-mode on the html element switches everything, with no JavaScript and before hydration. Portalled overlays inherit it automatically.
Cost
Nested themes are not supported.

Decision

Publish the exact tarball that was tested.

Why
A script packs the library, installs the tarball in a fresh app, checks strict TypeScript, imports all 48 entry points and tests both stylesheet paths in a real browser. Version 0.2.0 was tested this way before it was published, and its hash matches the tested tarball.
Cost
A manual release step, and the fresh-app test covers only React with Vite.

Decision

Generate the documentation from the source.

Why
API tables, per-component pages and an llms.txt file come from the TypeScript source, and a check fails when the generated output drifts. Coding agents get a small entry point and fetch only the pages they need.
Cost
Generated files live in the repository, and descriptions still need hand editing.

rillmark.bereket.devLive site

A project dashboard built from Rillmark components, with metric cards and a searchable table of fictional projects.
One of five example apps. The company and figures are fictional.

What the checks cover

The counts are the project's own record.

  • 45 unit tests and 42 browser tests in headed Chromium, including keyboard paths and focus return.
  • axe scans of all 48 component pages in all six palettes.
  • 72 color contrast assertions across the palettes.
  • Reduced motion, checked in the browser.
  • The test suites also pass in GitHub Actions.

Not covered: Safari, Firefox, real touch devices and screen readers. The automated checks do not establish full accessibility conformance. The example apps run in the browser with sample data and have no backend.

What each technology did

A single tokens file
Generates CSS for three presets in light and dark, with no theme provider at run time.
TypeScript AST tooling
Generates API tables and agent-readable docs from the source, and CI fails if they drift.
axe and Playwright
Scan all 48 component pages in six palettes and drive keyboard paths in a real browser.
A packed-tarball test
Installs the built package in a fresh app and checks both stylesheet paths before release.