Skip to content
Back to home

Building Atman Design System

By Rafael Craice · January 2026 · Case Study

Project Overview

Atman (from Sanskrit, meaning "essence" or "soul") is a lean, accessible, and modern Design System built with Web Components. It was created as a portfolio piece to demonstrate the end-to-end development of a design system by a single person with AI assistance.

The goal was to build a complete, production-ready design system as a single-person effort powered by AI. From design tokens to accessible components to documentation, every piece ships with WCAG AA compliance, TypeScript types, Storybook stories, and dark mode support.

The Author

I'm Rafael Craice, a Product Designer with deep frontend experience. Atman represents the intersection of my design practice and technical background, showcasing what's possible when a designer has the skills to build their own design system from scratch.

Design Decisions

Philosophy: Essentialism

Atman follows a lean philosophy. Where many design systems offer dozens of variants, multiple size options, and extensive configuration, Atman deliberately provides the minimum needed to build functional, beautiful applications:

Token System

The design token system is built on an 8px grid with a spacing scale of 4, 8, 12, 16, 24, 32, 48, 64, and 96 pixels. Typography uses Geist, Vercel's open-source font family, chosen for its excellent readability and modern aesthetic.

All tokens are implemented as CSS Custom Properties (--atman-*), enabling runtime theming and framework-agnostic consumption. The system includes 300+ tokens covering colors, spacing, typography, shadows, border radius, transitions, z-index, and focus styles.

Component API Standards

Every component follows strict conventions:

Technical Architecture

Layer Technology Purpose
Components Lit 3 Web Components framework
Icons Lucide Icon library
Language TypeScript Type safety
Build Vite Bundling and dev server
Tests Vitest + Happy DOM Unit testing
Documentation Storybook Interactive docs and examples
CI/CD GitHub Actions Build, test, deploy
Design Sync Tokens Studio Figma token integration

Why Web Components?

Web Components were chosen specifically for framework-agnostic distribution. A design system that only works with React or Vue limits adoption. Web Components work everywhere — React, Vue, Angular, Svelte, or plain HTML. They use the platform, not a framework.

Lit was selected over raw custom elements for its ergonomic features: reactive properties, efficient DOM updates via lit-html, scoped styles, and TypeScript decorators. The trade-off is a small runtime dependency (~7KB gzipped), which is acceptable for the developer experience gained.

Shadow DOM: Encapsulation vs. Flexibility

All components use Shadow DOM for style encapsulation. This guarantees components look correct regardless of the host application's CSS. The downside is that external styling requires ::part() selectors or CSS Custom Properties, but this is by design — it prevents accidental style leakage and ensures visual consistency.

Accessibility Approach

Accessibility is not an afterthought in Atman — it's a baseline requirement. Every component was built with WCAG AA compliance from the start, and a full accessibility audit (Phase 7) validated and fixed remaining issues.

Key Accessibility Features

AI-Assisted Development

Atman was built using an AI-assisted development approach where the human provides direction, vision, and quality control while an AI assistant (Claude Code by Anthropic) handles the implementation details.

How It Worked

The entire project was guided by a single document that served as the project brief, technical specification, and progress tracker. This document defined:

Each development session followed a pattern: start a phase, let Claude Code implement the components and documentation, review the output, iterate on details, and move to the next phase.

What Worked Well

What Required Human Judgment

Results

16
Components
300+
Design Tokens
21
Storybook Stories
10
Example Compositions

Deliverables

Development Phases

Learnings

On Design Systems

Start with constraints. Defining a limited set of sizes, variants, and components upfront made every subsequent decision easier. When in doubt, leave it out — you can always add later, but removing is painful.

Tokens are the foundation. Getting the design token system right early saved enormous effort later. Every component references tokens, so changes propagate consistently. The time invested in the token structure paid dividends throughout the project.

On AI-Assisted Development

The brief is everything. The quality of Claude Code's output was directly proportional to the clarity of the project brief. The atman.md document served as both specification and context, enabling the AI to maintain consistency across sessions.

Human taste is irreplaceable. AI is excellent at implementing patterns once defined, but the design decisions — what feels right, what to prioritize, how to balance trade-offs — still require human judgment and design experience.

Review is essential. AI-generated code needs the same code review rigor as human-written code. The accessibility audit (Phase 7) caught issues that were technically correct but suboptimal from a user experience perspective.

Future Plans

Phase 10 will add 8 additional components: Switch, Progress, Accordion, Breadcrumb, Textarea, Pagination, Dropdown Menu, and Table. The foundation is solid — adding components now follows well-established patterns.

Explore the design system

View Storybook GitHub Repository