shadcn Component Catalog
shadcn Component Catalog
Section titled “shadcn Component Catalog”packages/ui에 shadcn 기반 컴포넌트를 실제 재사용 가능한 React 컴포넌트로 적재하고, Storybook에서 대표 조합을 검수합니다.
이 문서는 단순 목록이 아니라 다음 기준을 기록합니다.
- 어떤 컴포넌트가 구현되어 있는지
- 어떤 외부 라이브러리에 의존하는지
- Storybook에서 어떤 수준의 예제로 확인하는지
- 운영 코드에서 import할 때 어떤 경계를 지켜야 하는지
Storybook
Section titled “Storybook”Storybook 경로: Design System/shadcn/Components
현재 Storybook은 요청한 shadcn component catalog와 Chart, Tooltip, Overview Story를 함께 제공합니다.
| 영역 | 위치 |
|---|---|
| 실제 컴포넌트 | packages/ui/src/components |
| shadcn catalog Story | packages/ui/src/shadcn-showcase/shadcn-showcase.stories.tsx |
| Chart Story | packages/ui/src/shadcn-showcase/shadcn-chart.stories.tsx |
| Story 전용 export | packages/ui/src/shadcn-showcase/story-components.ts |
| public export | packages/ui/src/index.ts |
| CSS 변수와 Tailwind source | packages/ui/src/styles/global.css |
Component 목록
Section titled “Component 목록”| 그룹 | 컴포넌트 |
|---|---|
| Foundation | Button, Button Group, Badge, Kbd, Label, Separator, Skeleton, Spinner |
| Layout | Aspect Ratio, Card, Resizable, Scroll Area, Sidebar, Sheet |
| Form | Checkbox, Combobox, Field, Input, Input Group, Input OTP, Native Select, Radio Group, Select, Slider, Switch, Textarea |
| Overlay | Alert Dialog, Context Menu, Dialog, Drawer, Dropdown Menu, Hover Card, Menubar, Popover, Tooltip |
| Navigation | Accordion, Breadcrumb, Navigation Menu, Pagination, Tabs, Toggle, Toggle Group |
| Data Display | Alert, Avatar, Calendar, Carousel, Chart, Command, Data Table, Date Picker, Empty, Item, Progress, Sonner, Table, Toast |
| Utility | Collapsible, Direction |
보강된 Story 기준
Section titled “보강된 Story 기준”Sidebar
Section titled “Sidebar”Sidebar는 단순 목록이 아니라 application shell 기준으로 검수합니다.
- workspace header
- sidebar search
- primary navigation with badges
- nested component navigation
- group action and menu action
- footer account/support section
- inset content and trigger
Navigation Menu
Section titled “Navigation Menu”Navigation Menu는 1-depth link가 아니라 2-depth navigation example로 구성합니다.
Producttrigger: featured card + 하위 링크Resourcestrigger: documentation/template/example 링크Documentationdirect link
Menubar
Section titled “Menubar”Menubar는 네 개 메뉴를 기준으로 구성합니다.
File: grouped commands and shortcutsEdit: submenuView: checkbox and radio examplesProfile: account actions
Field는 단일 input wrapper가 아니라 accessible form composition 기준으로 구성합니다.
FieldSet,FieldLegend,FieldDescription- validation with
FieldError FieldSeparator- horizontal checkbox/switch fields
- input and native select composition
주요 의존성
Section titled “주요 의존성”| 목적 | 패키지 |
|---|---|
| Radix primitives | radix-ui |
| Base UI combobox | @base-ui/react |
| Command palette | cmdk |
| Resizable panel | react-resizable-panels |
| Carousel | embla-carousel-react |
| Calendar/date | react-day-picker, date-fns |
| Chart | recharts, decimal.js-light |
| Drawer | vaul |
| OTP | input-otp |
| Toast | sonner, next-themes |
| Animation utilities | tw-animate-css |
운영 사용 규칙
Section titled “운영 사용 규칙”import { Button, Card, Dialog, SidebarProvider } from "@my-lab/ui";import "@my-lab/ui/styles/global.css";- 앱에서는
packages/ui/src/components내부 파일을 직접 import하지 않습니다. - Storybook-only 조합은
packages/ui/src/shadcn-showcase에 둡니다. - recipe 성격 컴포넌트는 필요한 primitive를 조합하되 public export에 포함합니다.
- Chart/Recharts처럼 bundler interop이 필요한 경우 wrapper와 Vite alias를 분리해 관리합니다.
- shadcn Sidebar:
https://ui.shadcn.com/docs/components/radix/sidebar - shadcn Navigation Menu:
https://ui.shadcn.com/docs/components/navigation-menu - shadcn Menubar:
https://ui.shadcn.com/docs/components/menubar - shadcn Field:
https://ui.shadcn.com/docs/components/field