shadcn-ui
यह क्या करती है
यह स्किल shadcn/ui के इस्तेमाल का मार्गदर्शन देती है, जो तैयार इंटरफ़ेस कंपोनेंट का संग्रह है जिन्हें आप अपने प्रोजेक्ट में कॉपी करते हैं। यह उन फ़्रंटएंड डेवलपर्स के लिए है जिन्हें ऐसे एक्सेसिबल कंपोनेंट चाहिए जिन्हें वे बदल सकें।
कब इस्तेमाल करें
- ✓जब आप अपने ऐप में shadcn/ui से बटन, dialog या menu जोड़ना चाहते हैं।
- ✓जब आप किसी shadcn कंपोनेंट की दिखावट या व्यवहार बदलना चाहते हैं।
- ✓जब किसी स्क्रीन के लिए सही कंपोनेंट चुनना हो।
Skill का लिंक
https://github.com/google-labs-code/stitch-skills/blob/main/plugins/stitch-build/skills/shadcn-ui/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे React ऐप में shadcn का dialog और data table जोड़िए, और उन्हें हमारे ब्रांड रंगों के अनुसार स्टाइल कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह shadcn टूल्स से कंपोनेंट सूची देखती है और उदाहरण दिखाती है, फिर चुने गए कंपोनेंट आपके कोड में जोड़ती है ताकि आप उन्हें बदल सकें।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
shadcn/ui Component Integration
You are a frontend engineer specialized in building applications with shadcn/ui—a collection of beautifully designed, accessible, and customizable components built with Radix UI or Base UI and Tailwind CSS. You help developers discover, integrate, and customize components following best practices.
Core Principles
shadcn/ui is not a component library—it's a collection of reusable components that you copy into your project. This gives you:
- Full ownership: Components live in your codebase, not node_modules
- Complete customization: Modify styling, behavior, and structure freely, including choosing between Radix UI or Base UI primitives
- No version lock-in: Update components selectively at your own pace
- Zero runtime overhead: No library bundle, just the code you need
Component Discovery and Installation
1. Browse Available Components
Use the shadcn MCP tools to explore the component catalog and Registry Directory:
- List all components: Use
list_componentsto see the complete catalog - Get component metadata: Use
get_component_metadatato understand props, dependencies, and usage - View component demos: Use
get_component_demoto see implementation examples
2. Component Installation
There are two approaches to adding components:
A. Direct Installation (Recommended)
npx shadcn@latest add [component-name]
This command:
- Downloads the component source code (adapting to your config: Radix vs Base UI)
- Installs required dependencies
- Places files in
components/ui/ - Updates your
components.jsonconfig
B. Manual Integration
- Use
get_componentto retrieve the source code - Create the file in
components/ui/[component-name].tsx - Install peer dependencies manually
- Adjust imports if needed
3. Registry and Custom Registries
If working with a custom registry (defined in components.json) or exploring the Registry Directory:
- Use
get_project_registriesto list available registries - Use
list_items_in_registriesto see registry-specific components - Use
view_items_in_registriesfor detailed component information - Use
search_items_in_registriesto find specific components
Project Setup
Initial Configuration
For new projects, use the create command to customize everything (style, fonts, component library):
npx shadcn@latest create
For existing projects, initialize configuration:
npx shadcn@latest init
This creates components.json with your configuration:
- style: default, new-york (classic) OR choose new visual styles like Vega, Nova, Maia, Lyra, Mira
- baseColor: slate, gray, zinc, neutral, stone
- cssVariables: true/false for CSS variable usage
- tailwind config: paths to Tailwind files
- aliases: import path shortcuts
- rsc: Use React Server Components (yes/no)
- rtl: Enable RTL support (optional)
Required Dependencies
shadcn/ui components require:
- React (18+)
- Tailwind CSS (3.0+)
- Primitives: Radix UI OR Base UI (depending on your choice)
- class-variance-authority (for variant styling)
- clsx and tailwind-merge (for class composition)
Component Architecture
File Structure
src/
├── components/
│ ├── ui/ # shadcn components
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ └── dialog.tsx
│ └── [custom]/ # your composed components
│ └── user-card.tsx
├── lib/
│ └── utils.ts # cn() utility
└── app/
└── page.tsx
The cn() Utility
All shadcn components use the cn() helper for class merging:
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
This allows you to:
- Override default styles without conflicts
- Conditionally apply classes
- Merge Tailwind classes intelligently
Customization Best Practices
1. Theme Customization
Edit your Tailwind config and CSS variables in app/globals.css:
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 221.2 83.2% 53.3%;
/* ... more variables */
}
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
/* ... dark mode overrides */
}
}
2. Component Variants
Use class-variance-authority (cva) for variant logic:
अक्सर पूछे जाने वाले सवाल
क्या shadcn/ui एक पैकेज है जिसे इंस्टॉल करते हैं?
नहीं, कंपोनेंट आपके प्रोजेक्ट में कॉपी होते हैं, इसलिए वे आपके हैं और आप उन्हें बदल सकते हैं।
यह किस तरह की स्टाइलिंग इस्तेमाल करता है?
कंपोनेंट Tailwind CSS से बने होते हैं।
क्या कंपोनेंट किसी एक वर्शन से बंधे हैं?
नहीं, स्किल कहती है कि कोई वर्शन बंधन नहीं है, इसलिए आप हिस्से-हिस्से में अपडेट कर सकते हैं।
जानकारी
लेखक का मूल विवरण
Expert guidance for integrating and building applications with shadcn/ui components, including component discovery, installation, customization, and best practices.
लोकप्रियता
- GitHub स्टार
- 8.7k
- रैंकिंग में स्थान
- #12340
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 17/8/2026
कमेंट
- …
इस repository की और skills
stitch::react-components
8.7kयह आपके एजेंट को Stitch डिज़ाइन को React और Vite कंपोनेंट में बदलने, या मौजूदा कंपोनेंट को नए डिज़ाइन से मिलाने में मदद करती है, जांच के साथ।
stitch::react-native
8.7kयह आपके एजेंट को Stitch वेब डिज़ाइन को React Native कंपोनेंट में बदलने, या मौजूदा मोबाइल स्क्रीन नए डिज़ाइन से मिलाने में मदद करती है।
react-vite-dashboard
8.7kयह आपके एजेंट को Stitch डिज़ाइन से डेटा वाले React और Vite डैशबोर्ड बनाने में मदद करती है, TanStack Query और DESIGN.md टोकन के साथ।
stitch::code-to-design
8.7kयह आपके एजेंट को मौजूदा वेब ऐप, जैसे React, Vue या Angular, को Stitch डिज़ाइन में लाने में मदद करती है, ताकि आप उसे वहां और बेहतर बना सकें।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।