← all projects
Component Library

Cockroach UI

Accessible, highly customizable React component library built with TypeScript, Tailwind CSS, and Class Variance Authority. WCAG-compliant primitives with dark mode, Storybook docs, comprehensive tests, and a companion card-component package.

A from-scratch React component library: WCAG-compliant components with proper ARIA, CVA-driven variants, dark-mode support, Storybook documentation, and Vitest + Testing Library coverage — plus a separate reusable card-component collection.

React
TypeScript
Tailwind

Problem Statement

Teams need a component library that is accessible by default, easy to theme, and consistent — but most hand-rolled libraries skip accessibility, hard-code styles (so variants explode into one-off components), and lack docs/tests, so they rot. Building one properly means solving variants, a11y, theming, documentation, and testing together.

Proposed Solution

Cockroach UI is a modern, accessible, highly customizable React component library. It uses Class Variance Authority (CVA) so a single component declares its variants/sizes/states declaratively (no component-per-variant sprawl), bakes in WCAG-compliant ARIA and keyboard support, supports light/dark themes, documents everything in Storybook, and is covered by Vitest + Testing Library. A companion package, cockroach-cards-ui, provides a focused collection of reusable card components.

Full Solution Details

  • Design system — clean, consistent components with a coherent visual language.
  • Accessibility-first — WCAG-compliant components with proper ARIA attributes and keyboard interaction.
  • Highly customizable — CVA manages variants and styles, so consumers compose looks via props instead of forking components.
  • Responsive — mobile-first breakpoints.
  • Dark-mode ready — light/dark theming support.
  • Storybook — interactive documentation and a development/testing surface for every component.
  • Tested — unit tests with Vitest + Testing Library.
  • Typed — full TypeScript types and IntelliSense.
  • Cards package — a separate library of card components for consistent, drop-in cards.

Technical Documentation

React + TypeScript, styled with Tailwind CSS and variant-managed by class-variance-authority (the now-standard pattern for typed, composable component variants). Accessibility is treated as a baseline requirement (ARIA + keyboard), not an add-on. Storybook doubles as living documentation and an isolated dev environment; Vitest + React Testing Library provide the test harness. Distributed as an installable package (npm install cockroach-ui), with the card components split into their own package for separation of concerns.

Tech Stack

React, TypeScript, Tailwind CSS, class-variance-authority (CVA), Storybook, Vitest, React Testing Library; npm distribution.

System Design

 cockroach-ui (core)
   ├── components (CVA-managed variants/sizes/states)
   ├── ARIA + keyboard (WCAG) baked into each component
   ├── Tailwind tokens · light/dark theme
   ├── Storybook (docs + dev surface)
   └── Vitest + Testing Library (coverage)
 cockroach-cards-ui (companion)
   └── reusable card components
        installable via npm · full TypeScript types

Smart Architectural Decisions

  • CVA for variants. Declaring variants/sizes/states with class-variance-authority (instead of a component per permutation or prop-driven if-soup) keeps the API typed, composable, and DRY — the modern best practice, applied correctly.
  • Accessibility as a baseline, not a feature. Building ARIA + keyboard support into every component means consumers inherit a11y for free, which is the single biggest thing hand-rolled libraries get wrong.
  • Storybook as docs + dev env. Using Storybook for both interactive docs and isolated component development is the right workflow for a library and drives adoption.
  • Cards split into their own package keeps concerns separated and lets consumers take only what they need.
  • Tested + typed (Vitest/RTL + full TS) signals it's meant to be depended on.

Impacts

A reusable, accessible, themeable React component library with first-class docs and tests — the kind of foundation that standardizes UI and a11y across projects, and a concrete demonstration of design-system engineering separate from his enterprise Kamona work.

Demonstrated Skills

Component-library/design-system engineering; variant API design with CVA; accessibility engineering (WCAG, ARIA, keyboard); Tailwind theming + dark mode; Storybook-driven documentation and isolated development; component testing (Vitest + Testing Library); TypeScript typing; npm package distribution and multi-package separation.

Notes

  • Shows he can build a design system from zero (not just consume one) — CVA variants + WCAG a11y + theming + Storybook + tests is the complete, correct toolkit, and it pairs with his enterprise Kamona experience as proof at both scales.
  • Accessibility-first is the differentiator: most portfolio component libs skip ARIA/keyboard; doing it as a baseline signals real front-end maturity.
  • Modern best-practice stack (CVA + Tailwind + Storybook + Vitest) reads as current and team-ready.
  • Package hygiene: splitting cards into a separate package and shipping types/tests shows library-author discipline.
  • Good companion talking point to Meemaw and Kobiowu in a 'libraries I've built' narrative.
Ask me anything