shadcn-ui
하는 일
이 스킬은 shadcn/ui 사용을 안내합니다. shadcn/ui는 프로젝트에 복사해 넣는 기성 인터페이스 컴포넌트 모음입니다. 직접 고칠 수 있는 접근성 있는 컴포넌트를 원하는 프론트엔드 개발자를 위한 것입니다.
사용하는 경우
- ✓앱에 shadcn/ui의 버튼, 대화상자, 메뉴를 추가하고 싶을 때.
- ✓shadcn 컴포넌트의 모양이나 동작을 바꾸고 싶을 때.
- ✓화면에 맞는 컴포넌트를 고르고 싶을 때.
스킬 링크
https://github.com/google-labs-code/stitch-skills/blob/main/plugins/stitch-build/skills/shadcn-ui/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 React 앱에 shadcn 대화상자와 데이터 테이블을 추가하고, 우리 브랜드 색에 맞게 꾸며 주세요.”
매주 새 스킬 5개. 읽는 데 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
- 업데이트
- 2026. 8. 17.
댓글
- …
이 저장소의 다른 스킬
stitch::react-components
8.7kStitch 디자인을 React와 Vite 컴포넌트로 바꾸거나, 기존 컴포넌트를 최신 디자인에 맞게 업데이트하고, 점검을 거치도록 돕습니다.
stitch::react-native
8.7kStitch 웹 디자인을 휴대폰 앱용 React Native 컴포넌트로 바꾸거나, 기존 모바일 화면을 새 디자인에 맞게 업데이트하도록 돕습니다.
react-vite-dashboard
8.7kStitch 디자인으로 데이터가 많은 React와 Vite 대시보드를 만들고, TanStack Query와 DESIGN.md 파일의 디자인 토큰을 씁니다.
stitch::code-to-design
8.7kReact, Vue, Angular 같은 기존 웹 앱을 Stitch 디자인으로 옮겨, Stitch에서 계속 개선할 수 있게 돕습니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.