본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)25k · #10079

shadcn

하는 일

이 스킬은 웹 프로젝트의 shadcn/ui 컴포넌트를 추가, 검색, 스타일링하는 등 관리합니다. shadcn/ui로 인터페이스를 만드는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓프로젝트에 대화 상자, 표, 차트 같은 shadcn/ui 컴포넌트를 추가하고 싶을 때.
  • ✓기존 shadcn/ui 컴포넌트를 고치거나 스타일을 다시 입혀야 할 때.
  • ✓직접 UI를 쓰는 대신 기존 shadcn/ui 컴포넌트로 페이지를 만들고 싶을 때.

스킬 링크

https://github.com/nocobase/nocobase/blob/v3-develop/packages/app/app-skills/skills/nocobase-app-development/references/frontend/shadcn/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/nocobase/nocobase/blob/v3-develop/packages/app/app-skills/skills/nocobase-app-development/references/frontend/shadcn/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 설정 페이지에 shadcn 데이터 테이블과 대화 상자 양식을 추가해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 프로젝트 설정과 컴포넌트 문서를 확인하고, 레지스트리에서 컴포넌트를 검색한 뒤, 컴포넌트 소스 코드를 프로젝트에 추가합니다. 그다음 내장 변형과 의미 색상을 사용해 컴포넌트를 스타일링하고 조합합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

shadcn/ui

A framework for building ui, components and design systems. Components are added as source code to the user's project via the CLI.

IMPORTANT: Run all CLI commands using the project's package runner: npx shadcn@latest, pnpm dlx shadcn@latest, or bunx --bun shadcn@latest — based on the project's packageManager. Examples below use npx shadcn@latest but substitute the correct runner for the project.

Current Project Context

!`npx shadcn@latest info --json`

The JSON above contains the project config and installed components. Use npx shadcn@latest docs <component> to get documentation and example URLs for any component.

Principles

  1. Use existing components first. Use npx shadcn@latest search to check registries before writing custom UI. Check community registries too.
  2. Compose, don't reinvent. Settings page = Tabs + Card + form controls. Dashboard = Sidebar + Card + Chart + Table.
  3. Use built-in variants before custom styles. variant="outline", size="sm", etc.
  4. Use semantic colors. bg-primary, text-muted-foreground — never raw values like bg-blue-500.

Critical Rules

These rules are always enforced. Each links to a file with Incorrect/Correct code pairs.

Styling & Tailwind → styling.md

  • className for layout, not styling. Never override component colors or typography.
  • No space-x-* or space-y-*. Use flex with gap-*. For vertical stacks, flex flex-col gap-*.
  • Use size-* when width and height are equal. size-10 not w-10 h-10.
  • Use truncate shorthand. Not overflow-hidden text-ellipsis whitespace-nowrap.
  • No manual dark: color overrides. Use semantic tokens (bg-background, text-muted-foreground).
  • Use cn() for conditional classes. Don't write manual template literal ternaries.
  • No manual z-index on overlay components. Dialog, Sheet, Popover, etc. handle their own stacking.

Forms & Inputs → forms.md

  • Forms use FieldGroup + Field. Never use raw div with space-y-* or grid gap-* for form layout.
  • InputGroup uses InputGroupInput/InputGroupTextarea. Never raw Input/Textarea inside InputGroup.
  • Buttons inside inputs use InputGroup + InputGroupAddon.
  • Option sets (2–7 choices) use ToggleGroup. Don't loop Button with manual active state.
  • FieldSet + FieldLegend for grouping related checkboxes/radios. Don't use a div with a heading.
  • Field validation uses data-invalid + aria-invalid. data-invalid on Field, aria-invalid on the control. For disabled: data-disabled on Field, disabled on the control.

Component Structure → composition.md

  • Items always inside their Group. SelectItem → SelectGroup. DropdownMenuItem → DropdownMenuGroup. CommandItem → CommandGroup.
  • Use asChild (radix) or render (base) for custom triggers. Check base field from npx shadcn@latest info. → base-vs-radix.md
  • Dialog, Sheet, and Drawer always need a Title. DialogTitle, SheetTitle, DrawerTitle required for accessibility. Use className="sr-only" if visually hidden.
  • Use full Card composition. CardHeader/CardTitle/CardDescription/CardContent/CardFooter. Don't dump everything in CardContent.
  • Button has no isPending/isLoading. Compose with Spinner + data-icon + disabled.
  • TabsTrigger must be inside TabsList. Never render triggers directly in Tabs.
  • Avatar always needs AvatarFallback. For when the image fails to load.

Use Components, Not Custom Markup → composition.md

  • Use existing components before custom markup. Check if a component exists before writing a styled div.
  • Callouts use Alert. Don't build custom styled divs.
  • Empty states use Empty. Don't build custom empty state markup.
  • Toast follows the project base. Use toast from the toast component for Base UI projects. Use toast() from sonner for Radix and React Aria projects.
  • Use Separator instead of <hr> or <div className="border-t">.
  • Use Skeleton for loading placeholders. No custom animate-pulse divs.
  • Use Badge instead of custom styled spans.

Icons → icons.md

  • Icons in Button use data-icon. data-icon="inline-start" or `data-icon="inline-
자주 묻는 질문

shadcn/ui란 무엇인가요?

소스 코드로 프로젝트에 복사되는 UI 컴포넌트 세트입니다.

어떤 프로젝트가 필요한가요?

components.json 파일이 있는 프로젝트이며, 스킬은 이 파일을 읽어 설정을 확인합니다.

다른 컴포넌트 라이브러리도 검색할 수 있나요?

네. 커뮤니티 레지스트리를 포함해 레지스트리를 검색할 수 있습니다.

상세 정보

작성자의 원본 설명

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".

repo: nocobase/nocobase

인기도

GitHub 스타
25k
순위
#10079
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬