tailwind-theme
スター13
フォーク9
更新日2026年4月17日 19:39
Color system, button styling, and theme conventions for the web package
インストール
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SKILL.md
readonlyメニュー
Color system, button styling, and theme conventions for the web package
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Standard pattern for writing CLI scripts using Commander.js
Generate WordPress-style crawlers for public infrastructure disruption sources
Guidelines for logging in the ingest and web packages
Reminders and checks when working on onboarding/on boarding/on-boarding features
| name | tailwind-theme |
| description | Color system, button styling, and theme conventions for the web package |
| version | 1.0.0 |
| keywords | ["tailwind","theme","colors","button","styling","css","design","variant"] |
IMPORTANT: Using Tailwind Theme skill! Never hardcode colors — always use theme tokens.
web/lib/colors.ts — All color definitionsweb/app/globals.css — Theme implementation via Tailwind v4 @themeweb/lib/theme.ts — Button styles and helpers| Token prefix | Purpose | Example hex |
|---|---|---|
primary / primary-hover | Primary actions | #1976D2 (blue) |
destructive / destructive-hover | Destructive actions | #E74C3C (red) |
neutral / neutral-* | Borders, backgrounds, text, disabled states | gray equivalents |
error / error-* | Validation errors, error messages | red |
warning / warning-* | Warnings, caution states | amber/yellow |
success / success-* | Success states, confirmations | green |
info / info-* | Informational messages | blue |
header-bg / nav-bg / footer-bg / link | Layout-specific | — |
Use getButtonClasses(variant, size, radius) from web/lib/theme.ts.
| Parameter | Options |
|---|---|
| Variants | primary, destructive, secondary, warning, success, ghost, link, linkDestructive |
| Sizes | sm, md, lg |
| Radius | sm (rounded-md, most common), md (rounded-lg), lg (rounded-xl), full (rounded-full) |
// ✅ Good — Using theme colors
import { buttonStyles, buttonSizes, borderRadius } from "@/lib/theme";
<button className={`${buttonSizes.md} ${buttonStyles.primary} ${borderRadius.md}`}>
Save
</button>
<div className="border border-neutral-border bg-neutral-light">
Content
</div>
<div className="border border-error-border bg-error-light text-error">
Error message
</div>
// ❌ Bad — Hardcoded colors
<button className="bg-blue-500 hover:bg-blue-600 px-4 py-2 rounded-lg">
Save
</button>
<div className="border border-gray-200 bg-gray-50">
Content
</div>
<div className="border border-red-200 bg-red-50 text-red-700">
Error message
</div>
Import from web/lib/colors.ts: opacity, borderRadius. Use for consistent spacing and transparency across the app.
bg-blue-*, text-gray-*, border-red-*, etc.)getButtonClasses() or buttonStyles.* from web/lib/theme.tserror-* for errors, not destructive-*)web/lib/colors.ts first, then consumed via CSS variables