shadcn-docs

Provide development guidelines and best practices for shadcn/ui components.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/xyqyear/my-claude-skills --skill shadcn-docs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shadcn-docs
Source: https://github.com/xyqyear/my-claude-skills/tree/main/skills/shadcn-docs
Command: npx skills add https://github.com/xyqyear/my-claude-skills --skill shadcn-docs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidelines and best practices for developing with shadcn/ui, ensuring consistency, maintainability, and adherence to modern UI development standards.

Core Features & Use Cases

  • Styling Rules: Enforces correct Tailwind CSS usage, semantic color application, and spacing conventions.
  • Component Composition: Guides on proper structuring of components like Card, Dialog, and Tabs.
  • Form Best Practices: Details on using FieldGroup, Field, and validation attributes for accessible forms.
  • CLI Usage: Clarifies the correct usage of the shadcn/ui CLI for adding, updating, and managing components.
  • Use Case: When you're unsure about the correct way to implement a new feature using shadcn/ui components, like creating a complex form or ensuring accessibility in a modal, this skill provides the definitive rules and examples.

Quick Start

Consult the shadcn-docs skill for guidance on using the cn() utility for conditional class names.

Frequently Asked Questions about shadcn-docs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Tailwind CSS semantic colors correctly in shadcn/ui components?

Using semantic colors in shadcn/ui requires following specific Tailwind CSS styling rules that enforce semantic color application and standard spacing conventions for consistent frontend development.

What is the best way to structure complex forms with shadcn/ui for accessibility?

The best way to structure accessible shadcn/ui forms is by composing FieldGroup and Field components with proper validation attributes, ensuring your frontend meets modern accessibility standards.

How do I add and manage shadcn/ui components using the CLI?

You add and manage shadcn/ui components using the CLI by executing specific commands designed for adding, updating, and managing your component library within your React project.

Does shadcn/ui work with base UI components or radix primitives?

shadcn/ui works with both base and radix primitives, and understanding their differences is crucial for correct API usage, component composition, and theming within your React frontend.

Why should I use the cn utility for conditional class names in React component libraries?

You should use the cn utility for conditional class names to properly merge Tailwind CSS classes, ensuring styling rules are followed and preventing class conflicts within shadcn/ui components.