sidebar

The Sidebar component provides a vertical navigation menu with support for nested links and optional footer content.

Usage

Default


<Sidebar 
  links={[{ label: "Dashboard", href: "/Dashboard", icon: <FaBook /> },
  {
    label: "Reports",
    children: [
      { label: "Monthly", icon: <FaCalendar /> },
      { label: "Annual", icon: <FaCalendar /> },
    ],
    icon: <FaPaperclip />,
  },
  { label: "Settings", href: "/Settings", icon: <FaCogs /> }]}
  currentPath="/Settings" 
/>

Props

Sortable data table
PropTypeDefaultDescription
linksArray<{ label: string; href?: string; icon?: ReactNode; children?: Array }>-Array of navigation links, each may include `label`, `href`, `icon`, and optional `children` for nested menus.
currentPathstring-The current active path used to highlight the active link.
theme"primary" | "secondary" | "tertiary" | "quaternary" | "clear"Configured DefaultTheme color for the sidebar.
state"success" | "error" | "warning"-Visual state for feedback (success, warning, error).
outlinebooleanfalseWhether the sidebar should use an outlined style.
rounding"none" | "small" | "medium" | "large"Configured DefaultCorner rounding style for the sidebar container.
shadow"none" | "light" | "medium" | "strong" | "intense"Configured DefaultBox shadow for the sidebar container.
showFooterbooleanfalseWhether to display the footer section at the bottom.
footerLinksArray<{ label: string; href: string; icon?: ReactNode }>-Array of footer links displayed when `showFooter` is true.
footerVersionstring-Version label displayed in the footer (e.g. v1.0.0).
classNamestring-Custom class names for the sidebar wrapper.
ariaLabelstring"Sidebar navigation"ARIA label for the sidebar navigation landmark.
data-testidstring"sidebar"Test id for querying the component in tests.