Pluto Design System
Components

SidebarMenu

사이드바 상단의 leading-icon + 라벨 메뉴 리스트. 단일 선택, 32px 행, `<nav>` 시멘틱.

사용

icon + label 조합의 vertical 메뉴. 사이드바 상단 영역 — Playground/Spirit/Inventory 같은 앱-전역 진입점에 쓴다. 라이브러리 항목처럼 라벨만 있는 리스트는 SidebarList.

import { SidebarMenu } from "@fluxloop-ai/pds-ui/components/sidebar-menu";
import { Books, Flask, Ghost } from "@fluxloop-ai/pds-icons/icons";

<SidebarMenu
  aria-label="기본 메뉴"
  items={[
    { id: "playground", icon: Flask, label: "Playground" },
    { id: "spirit", icon: Ghost, label: "Spirit" },
    { id: "inventory", icon: Books, label: "Inventory" },
  ]}
  selectedId={selected}
  onSelect={setSelected}
/>

Basic

Props

SidebarMenu

Prop타입기본설명
itemsSidebarMenuItem[]-필수. { id, icon, label }
selectedIdstring | nullnull선택된 항목 id
onSelect(id: string) => void-항목 클릭 시 호출
aria-labelstring-<nav> aria-label. 페이지에 nav 가 여러 개면 권장

SidebarMenuItem

Field타입설명
idstring고유 id
iconPhosphorIcon | ComponentType<SVGAttributes>leading 아이콘 (16px)
labelstring표시 라벨

Registry 설치

npx shadcn add https://pds.pluto.com/r/sidebar-menu