Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

shadcn-theme-default

bởi guifav

Web & Frontend Development
376Lượt tải do clawskills.sh công bố
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Enforces the default shadcn/ui Neutral theme (black/white/gray) with OKLCH CSS variables, Tailwind v4 integration.

Mô tả

Kỹ năng này làm gì

Applies and maintains the default shadcn/ui Neutral theme (black, white, gray) using OKLCH CSS variables. Covers light and dark mode variable definitions, Tailwind v4 @theme integration, and dark mode toggling via next-themes or manual class switching. Only modifies CSS and Tailwind configuration files.

Provides the complete variable set, Tailwind registration, and dark mode wiring in one place, removing the need to cross-reference shadcn/ui docs and Tailwind migration guides separately.

Khi nào nên dùng

  • Setting up the Neutral theme in a new Next.js + shadcn/ui project
  • Migrating a project from Tailwind v3 HSL variables to v4 OKLCH
  • Adding a working dark mode toggle to an existing shadcn/ui app
  • Auditing component files for hardcoded colors that should use theme tokens
  • Wiring up sidebar-specific CSS tokens separately from global surface tokens

Quy trình ví dụ

ĐẦU VÀO

User asks: Add the default shadcn/ui Neutral theme with dark mode to my Next.js app

AGENT
  1. 1

    Check globals.css and tailwind config for existing variable definitions

  2. 2

    Write the full :root and .dark CSS variable blocks to globals.css using OKLCH values

  3. 3

    Add the @theme inline directive to register variables as Tailwind color utilities

  4. 4

    Install next-themes and create a ThemeProvider wrapper component

  5. 5

    Wrap the root layout with ThemeProvider and add a ThemeToggle button

ĐẦU RA

globals.css contains complete light and dark variable sets, Tailwind classes like bg-primary and text-muted-foreground resolve correctly, and the app toggles between light and dark modes

Cài đặt

clawhub install guifav/shadcn-theme-default

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết