Skip to content

Core Components

Core components live in packages/ui/src/components. They should be small React primitives with predictable props, token-based styling, and Storybook examples. A component enters the design system only when it has a documented purpose, variants, states, accessibility expectations, and code export.

ComponentStatusNotes
AccordionActiveRadix disclosure pattern
AlertActiveStatus and contextual messages
Alert DialogActiveDestructive confirmation flow
Aspect RatioActiveFixed-ratio media and preview areas
AvatarActiveUser identity fallback
BadgeActiveCompact status labels
BreadcrumbActiveHierarchical page location
ButtonActiveCommand surface with variants and icon size
Button GroupActiveAdjacent command sets
CalendarActiveDate selection primitive
CardActiveContent container with header/content/footer
CarouselActiveEmbla carousel composition
ChartActiveRecharts wrapper with design tokens
CheckboxActiveBinary form control
CollapsibleActiveInline expandable content
ComboboxActiveSearchable select with Base UI
CommandActiveCommand palette and searchable list
Context MenuActiveRight-click contextual actions
Data TableActiveTable recipe for typed rows and columns
Date PickerActiveCalendar + popover recipe
DialogActiveModal workflow shell
DirectionActiveRTL/LTR provider example
DrawerActiveMobile-first bottom sheet
Dropdown MenuActiveTriggered action menu
EmptyActiveEmpty state composition
FieldActiveAccessible form field and group composition
Hover CardActiveHover disclosure for profile/context details
InputActiveText entry primitive
Input GroupActiveAddons and grouped inputs
Input OTPActiveOne-time code input
ItemActiveList item recipe with media/content/actions
KbdActiveKeyboard shortcut display
LabelActiveAccessible form label
MenubarActiveDesktop app menu composition
Native SelectActiveNative select styling
Navigation MenuActive2-depth website navigation
PaginationActivePage navigation recipe
PopoverActiveAnchored lightweight overlay
ProgressActiveDeterminate progress state
Radio GroupActiveSingle-choice form control
ResizableActivePanel group layout
Scroll AreaActiveStyled scroll container
SelectActiveRadix select composition
SeparatorActiveVisual grouping divider
SheetActiveSide panel overlay
SidebarActiveApp shell navigation system
SkeletonActiveLoading placeholder
SliderActiveRange input primitive
SonnerActiveToast provider and notifications
SpinnerActiveLoading indicator
SwitchActiveBoolean setting control
TableActiveSemantic table primitive
TabsActiveSection navigation
TextareaActiveMultiline text input
ToastActiveNotification recipe using Sonner
ToggleActiveToggle button primitive
Toggle GroupActiveSingle/multiple toggle set
TooltipActiveSmall contextual hint

Storybook 경로는 Design System/shadcn/Components입니다.

이 경로는 packages/ui/src/components의 실제 컴포넌트를 import해서 조합합니다. 임시 HTML/CSS 모사 구현은 기준으로 삼지 않습니다.

Sidebar Story는 앱 셸에 가깝게 구성합니다.

  • SidebarProvider, Sidebar, SidebarInset, SidebarTrigger
  • SidebarHeader, SidebarInput, SidebarContent, SidebarFooter
  • SidebarGroup, SidebarGroupLabel, SidebarGroupAction, SidebarGroupContent
  • SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarMenuBadge, SidebarMenuAction
  • SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton

Navigation Menu Story는 공식 문서와 유사하게 2-depth 구조를 보여줍니다.

  • 상위 trigger: Product, Resources
  • 직접 링크: Documentation
  • 하위 영역: featured card, link grid, description text

Menubar Story는 desktop app menu 기준으로 네 개 메뉴를 보여줍니다.

  • File: group, separator, shortcut
  • Edit: submenu
  • View: checkbox item, radio group
  • Profile: label, account actions

Field Story는 단일 input이 아니라 복합 form section 기준으로 보여줍니다.

  • FieldSet, FieldLegend, FieldDescription
  • FieldGroup, Field, FieldLabel, FieldContent
  • FieldError, FieldSeparator
  • Input, NativeSelect, Checkbox, Switch 조합
  • 컴포넌트 구현은 packages/ui/src/components에 둡니다.
  • 조합 예제는 packages/ui/src/shadcn-showcase/shadcn-showcase.stories.tsx에 둡니다.
  • 컴포넌트 export는 packages/ui/src/index.ts에서 관리합니다.
  • 스타일 토큰과 shadcn CSS 변수는 packages/ui/src/styles/global.css에서 관리합니다.
  • 외부 라이브러리 interop 보정은 Storybook/Vite 설정과 packages/ui/src/vendor wrapper로 격리합니다.
  • pnpm --filter @my-lab/ui typecheck
  • pnpm typecheck
  • pnpm lint
  • pnpm build:storybook
  • Storybook index에서 요청 component catalog와 보조 Story 누락 여부 확인
  • 대표 overlay/interactive component는 iframe 렌더링과 기본 상호작용 확인