tailwind-design-system
Build scalable Tailwind CSS v4 design systems — design tokens, component libraries, responsive patterns
- License 许可
- MIT
- 所属仓库
- HigorAlves/orc
- 最近更新
- 2026-11-07
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- tailwind-design-system
- description
- Build scalable Tailwind CSS v4 design systems — design tokens, component libraries, responsive patterns
- when_to_use
- Use for component libraries, design systems, or standardizing UI patterns.
02 资源文件 5
- 参考文档references/advanced-patterns.md7.9 KB
- 参考文档references/components.md7.1 KB
- 参考文档references/design-tokens.md4.7 KB
- 参考文档references/distinctive-ui.md4.0 KB
- 参考文档references/responsive.md2.0 KB
03 SKILL.md 正文
Tailwind Design System (v4)
Build production-ready design systems with Tailwind CSS v4: CSS-first configuration, design tokens, component variants, responsive patterns, accessibility, and a distinctive (non-generic) aesthetic.
Note: This skill targets Tailwind CSS v4 (2024+). For v3 projects, refer to the upgrade guide.
When to Use This Skill
- Creating a component library with Tailwind v4
- Implementing design tokens and theming with CSS-first configuration
- Building responsive and accessible components
- Standardizing UI patterns across a codebase
- Migrating from Tailwind v3 to v4
- Setting up dark mode with native CSS features
- Designing interfaces that look intentionally crafted, not generic "AI slop"
Key v4 Changes (at a glance)
| v3 Pattern | v4 Pattern |
|---|---|
tailwind.config.ts |
@theme in CSS |
@tailwind base/components/utilities |
@import "tailwindcss" |
darkMode: "class" |
@custom-variant dark (&:where(.dark, .dark *)) |
theme.extend.colors |
@theme { --color-*: value } |
require("tailwindcss-animate") |
native @keyframes + @starting-style |
Full migration checklist lives in references/advanced-patterns.md.
Core Concepts
- Design token hierarchy — Brand tokens → Semantic tokens → Component tokens. Reference tokens via utilities (
bg-primary), never hardcode colors. - Component architecture — Base styles → Variants → Sizes → States → Overrides. Use CVA for type-safe variants.
- CSS-first config — All theme configuration lives in
@themeblocks in CSS, not a JS/TS config file. - OKLCH colors — Prefer OKLCH for perceptual uniformity over HSL.
- React 19 —
refis a regular prop; noforwardRef.
Reference Topics
Read the topic file relevant to the task — each is self-contained with full copy-paste examples.
| Topic | File | Covers |
|---|---|---|
| Design tokens & setup | references/design-tokens.md | @theme quick-start, OKLCH semantic tokens, dark-mode variant + overrides, base styles, token hierarchy, cn() / focusRing / disabled utilities, v3→v4 change table |
| Component patterns | references/components.md | CVA button (Pattern 1), compound Card (Pattern 2), form Input/Label + React Hook Form + Zod (Pattern 3) |
| Responsive patterns | references/responsive.md | Responsive Grid + Container CVA components (Pattern 4) |
| Advanced patterns | references/advanced-patterns.md | Native CSS animations (Pattern 5), Dialog with Radix, dark-mode ThemeProvider + ThemeToggle (Pattern 6), custom @utility, theme modifiers (@theme inline/static), namespace overrides, color-mix() alpha variants, container queries, v3→v4 migration checklist, Do's & Don'ts |
| Distinctive UI | references/distinctive-ui.md | Avoiding generic AI aesthetics — design thinking, bold aesthetic direction, typography/color/motion/composition/background guidelines |
Best Practices (summary)
Do: use @theme blocks; OKLCH colors; compose with CVA; semantic tokens (bg-primary); size-* shorthand; ARIA + focus states; commit to a distinctive, cohesive aesthetic.
Don't: use tailwind.config.ts or @tailwind directives; use forwardRef; use arbitrary values (extend @theme instead); hardcode colors; forget dark mode; converge on generic fonts/palettes (Inter, purple-on-white, etc.).
Full Do's & Don'ts and the migration checklist are in references/advanced-patterns.md; aesthetic guidance is in references/distinctive-ui.md.
04 同仓库更多 Skills
writing-plans
Write a comprehensive implementation plan of bite-sized TDD tasks that an engineer with zero codebase context could execute — exact files, code, tests, and verification steps
writing-for-agents
orc's doctrine layer for writing any document an agent consumes — skills, AGENTS.md/CLAUDE.md, reference docs
workspace-mode
Use when cwd is a parent dir holding multiple sibling git repos — defines repo auto-detection, --repos/--repo/--all-repos/--this-repo precedence, per-repo dispatch, and linked-PR mechanics.
wizard
Generate an interactive bash wizard walking a human through work only they can perform — credentials, secrets, one-off migrations
wait-what
Stop and re-pitch — the last message did not land; say it again simply, in the project's own vocabulary.
vitest
Vitest fast unit testing framework powered by Vite with Jest-compatible API