• About
  • Projects
  • Contact
  • LinkedIn
  • GitHub

Component Lab: a visual workspace for shadcn

Browse, edit, or build from scratch. Four weeks of solo design and build, with AI as engineering partner.

View projectGitHub Repo
Component Lab: a visual workspace for shadcn
Component Lab in production. A visual workspace for shadcn/ui, built solo with AI as engineering partner.
Role
Designer & Developer
Client
Open Source / Personal Project
Date
Mar 2026 – Apr 2026 (2 months)
Scope
Concept, design, full-stack engineering, AI workflow setup
Tools
ShadcnShadcnTailwind CSSTailwind CSSVisual Studio CodeVisual Studio CodeClaude AIClaude AINotionNotionLinearLinearGitHubGitHubNetlifyNetlifyNextjsNextjsExcalidrawExcalidraw
A note before diving in: this is a tool I built for myself, not a product designed for a wide audience. It's public and you're welcome to use it, but the user it was built for is me.

TL;DR

No visual layer for shadcn/ui. shadcn is the default for most Next.js projects now. Designers spec components they don't fully understand. Developers jump between docs, Figma, and IDE for prototypes that should take minutes.

Built solo, AI as engineering partner. Four milestones across four weeks. Browse any shadcn component, inspect how it's built, edit it visually, or build something new from scratch.

The thinking is what made it worth building. Planning, structure, UX principles, pushback when the AI drifted. AI made the execution faster; none of it would have been worth doing without the thinking first.

Component Lab: a visual workspace for shadcn
The Component Lab playground.
Context

Component Lab is what I wished existed.

Most of my work lives in shadcn now. Building anything custom meant starting from a blank file every time. That was the part I most wanted to fix.

Think Figma meets Webflow, built specifically for shadcn.

Component Lab: a visual workspace for shadcn
From the dashboard, two paths: inspect any shadcn component and edit it visually, or start from scratch and build your own. Both end with export-ready TypeScript.
Working with AI

I treated the AI's environment as part of the design problem.

Locked stack, CLAUDE.md for persistent context, shadcn MCP for direct registry access. Linear held tickets with acceptance criteria upfront. Decisions documented as work progressed; lessons captured back into the AI's persistent memory.

Component Lab: a visual workspace for shadcn
Component Lab: a visual workspace for shadcn
Component Lab: a visual workspace for shadcn
The Notion master plan.
Component Lab: a visual workspace for shadcn
Component Lab: a visual workspace for shadcn
Component Lab: a visual workspace for shadcn
The Linear project: tickets, milestones, and a full history of every decision.
CLAUDE.md
CLAUDE.md: the AI's briefing document for every session.
The half-day task that became a milestone

Every backlog item assumes a foundation that might not exist.

A small backlog ticket: copy a component as a starting point for a new one. Half a day, in theory. Scoping it revealed the tool needed to read any component's source and reproduce it exactly. Which meant the registry files needed to be current. Which meant upgrading React, Tailwind, and the entire shadcn registry first.

Half a day had become a foundation reset.

Component Lab: a visual workspace for shadcn
A half-day ticket revealed a foundation reset. Each step depended on the one to its right.

The right call was to follow it. A proper milestone was scoped for the upgrade. The original task was pushed to a follow-up. Several other backlog items unstuck themselves once the foundation was right.

One lesson from the upgrade: don't trust automated migration tools on your own source code. The official Tailwind tool handled config correctly, then made over 30 incorrect changes across 60 source files. Use them for config only.

The parser came after, with a strict quality bar: read any component file, reproduce it byte-for-byte on export. An automated test enforced it on every change. If a pattern wasn't recognised, preserve it exactly and move on. Reformatting would create silent problems downstream.

Component Lab: a visual workspace for shadcn
46/46 passing the round-trip fidelity test.
The false victory

Done means the old approach is gone, not that the new one is built.

After shipping a new parser and unified export flow, I called the next milestone done. Opened the app for the first time in hours. Parts of the interface were reading from the new parser. Others were still reading from a frozen snapshot of the old data. One panel showed eight size options for a component. The toolbar showed four. Two different products visible at the same time.

The honest diagnosis: I'd built the interesting parts and quietly skipped the tedious one. Getting the from-scratch builder onto the new structure. The milestone was called "Unified Editor." I had built a new engine. I hadn't unified anything.

The proper fix shipped the next morning. The done criterion was mechanical: a specific git grep had to return zero matches. When the criterion is mechanical, there's nothing to argue about.

Outcome

Four milestones shipped, all components passing round-trip fidelity.

A working tool with three modes: browse, edit, build from scratch. Exports follow shadcn conventions exactly. Live at comp-lab.netlify.app, source on GitHub. A fifth milestone covering polish, onboarding, and accounts is ongoing.

Component Lab: a visual workspace for shadcn
Component Lab: a visual workspace for shadcn
Component Lab: a visual workspace for shadcn
Built with the same components it inspects.
stat-card.tsx
A component built from scratch in Component Lab and exported. The output follows shadcn conventions exactly: the same structure, patterns, and TypeScript you would expect from the official registry.
What I took from it

The work for designers in 2026 is to set the AI up to do good work, then catch it when it drifts.

Component Lab: a visual workspace for shadcn
When Claude wasn't getting the slider UI right, I drew the correction. This is what steering actually looks like.

The decisions-before-code approach paid for itself; no time lost re-litigating mid-build. Design principles (Hick, Gestalt, Fitts) shaped how the editor surfaced complexity, not just how it looked.

The false victory above is the clearest example of catching drift. Define what done looks like before you start, not when you think you're finished.

Share on LinkedIn

Other projects

Building a product from scratch at an early-stage startup
Building a product from scratch at an early-stage startup

Eleven months at a remote AI startup, first designer in. From no brand or UI to a shipped product with a successful pilot demo.

Designing my portfolio like a product
Designing my portfolio like a product

A new portfolio site, designed and built with the same care I'd give any other product brief.

Reducing churn for a global subscription service
Reducing churn for a global subscription service

10 weeks on a churn problem. Three concept directions, 15 international interviews on the most testable one, and a printer of our own to walk the customer journey end to end.

A better comparison slider for mobile
A better comparison slider for mobile

The comparison slider is one of the more useful components on this site. On mobile, it has two problems that quietly undermine the whole point of it.

Designing a smarter GenAI workflow for AI developers
Designing a smarter GenAI workflow for AI developers

Three iterations, 32 international users, and a product that stopped being a separately-named add-on along the way.

Building a scalable design system for a global risk platform
Building a scalable design system for a global risk platform

Four weeks to audit, build, and document. Dataviz built in as a first-class subsystem, not an afterthought.

Optimising the digital shopping experience for a home improvement retailer
Optimising the digital shopping experience for a home improvement retailer

A 3-week diagnostic across paint, kitchen, and timber. 153 ranked usability issues, four strategic questions, and Figma design variants for each.

Validating demand for a low-cost learning device in India
Validating demand for a low-cost learning device in India

A fake brand, real ads, and two weeks of live testing. What people want and what they'll pay for aren't the same number.

Cutting through the noise with short-form sales content
Cutting through the noise with short-form sales content

Eleven short videos to dispel myths about a managed services product, built to travel across markets, languages, and attention spans.

Understanding a diverse diaspora audience
Understanding a diverse diaspora audience

Ten interviews and four personas to help a community organisation see its audience more honestly.

Building a brand and site a solo founder can run himself
Building a brand and site a solo founder can run himself

A brand, site, and CMS for a solo legal advisor, built from a personal referral in under a week.

Building a product from scratch at an early-stage startup
Building a product from scratch at an early-stage startup

Eleven months at a remote AI startup, first designer in. From no brand or UI to a shipped product with a successful pilot demo.

Designing my portfolio like a product
Designing my portfolio like a product

A new portfolio site, designed and built with the same care I'd give any other product brief.

Reducing churn for a global subscription service
Reducing churn for a global subscription service

10 weeks on a churn problem. Three concept directions, 15 international interviews on the most testable one, and a printer of our own to walk the customer journey end to end.

A better comparison slider for mobile
A better comparison slider for mobile

The comparison slider is one of the more useful components on this site. On mobile, it has two problems that quietly undermine the whole point of it.

Designing a smarter GenAI workflow for AI developers
Designing a smarter GenAI workflow for AI developers

Three iterations, 32 international users, and a product that stopped being a separately-named add-on along the way.

Building a scalable design system for a global risk platform
Building a scalable design system for a global risk platform

Four weeks to audit, build, and document. Dataviz built in as a first-class subsystem, not an afterthought.

Optimising the digital shopping experience for a home improvement retailer
Optimising the digital shopping experience for a home improvement retailer

A 3-week diagnostic across paint, kitchen, and timber. 153 ranked usability issues, four strategic questions, and Figma design variants for each.

Validating demand for a low-cost learning device in India
Validating demand for a low-cost learning device in India

A fake brand, real ads, and two weeks of live testing. What people want and what they'll pay for aren't the same number.

Cutting through the noise with short-form sales content
Cutting through the noise with short-form sales content

Eleven short videos to dispel myths about a managed services product, built to travel across markets, languages, and attention spans.

Understanding a diverse diaspora audience
Understanding a diverse diaspora audience

Ten interviews and four personas to help a community organisation see its audience more honestly.

Building a brand and site a solo founder can run himself
Building a brand and site a solo founder can run himself

A brand, site, and CMS for a solo legal advisor, built from a personal referral in under a week.