[Org Name] · Design System
A shadcn/ui-based design system, themed via Tailwind v4 tokens, documented in Storybook, regression-tested with Chromatic.
Source of truth
The Storybook (published to a static URL) is the canonical reference for what components look like and how they behave. Chromatic baselines are the source for "is this change a regression."
Tech stack
React 19 + TypeScript + Tailwind v4 (CSS-first config). shadcn/ui as the base component layer (Radix primitives + Tailwind styling). Storybook 8 + the @storybook/test runner. Chromatic for visual regression. Published as a private npm package via changesets.
Deploy
- Storybook:
npm run build-storybook-> hosted on Vercel or Chromatic - Package: published to npm (or org's private registry) via changesets
File map
src/components/shadcn-based components (Button, Input, Dialog, etc)src/styles/tokens.cssTailwind v4@themeblock with brand tokenssrc/styles/globals.cssTailwind import + base layer overrides.storybook/Storybook config (main.ts, preview.tsx)src/stories/one.stories.tsxper componentchromatic.config.jsontsup.config.ts(or tsc) to build the npm package
.env keys
CHROMATIC_PROJECT_TOKENfor publishing baselines (in CI)NPM_TOKENfornpm publish(in CI)
Hard rules
- Every component has a story. Every story has at least: default, hover, focus, disabled, error states.
- Tokens (
tokens.css) are the ONLY place colors, spacing, radii, font sizes live. Components reference token vars, never hex. - Visual regression test runs in CI on every PR. Chromatic-approved changes go to baseline.
- Don't fork shadcn components unless you have to. Compose. The whole point of shadcn is the components are YOURS.
package.jsonexportsis explicit per component. Tree-shakeable: importingButtondoesn't pullDialog.- A11y is non-negotiable. Every component passes
axein its Storybook test.
Recent significant changes
- 2026-04-24: Scaffolded. Locked: shadcn/ui over Radix-direct (componentized starting point), Storybook over Ladle (Chromatic integration), Tailwind v4 tokens (CSS variables, themable at runtime).
Next session: start here
npx shadcn@latest initif from scratch (already done in this template).- Define your brand tokens in
src/styles/tokens.css. - Pick first 3 components: Button, Input, Card. Build stories for each.
- Set up Chromatic. Baseline the first PR.
- Publish a v0.1.0. Import it from one of your apps. Confirm tree-shaking works.