AppSidebar

App

Collapsible side navigation. Accepts navGroups or navItems with a built-in collapse toggle. The searchable prop adds an inline filter; a headerContent slot (above the nav groups) and a footer slot can host a workspace switcher, a user block or any content. Item badges take a count or any badge HTML. The active item, link or button, is marked aria-current="page"; collapsed, the nav reserves no scrollbar gutter, so the icons stay centered.

Açık (grouped nav + footer)

Code
<%- include('modules/app/AppSidebar', {
  navGroups: [
    { label: 'Main', items: [
      { id: 'dashboard', label: 'Dashboard', icon: 'fa-solid fa-house', href: '/' },
      { id: 'analytics', label: 'Analytics',  icon: 'fa-solid fa-chart-bar', badge: 3, href: '/analytics' },
    ]},
    { label: 'Settings', items: [
      { id: 'team',     label: 'Team',     icon: 'fa-solid fa-users', href: '/team' },
      { id: 'settings', label: 'Settings', icon: 'fa-solid fa-gear',  href: '/settings' },
    ]},
  ],
  activeId: currentPage,
  footerContent: userMenuHtml
}) %>

Arama filtreli sidebar

Code
<%- include('modules/app/AppSidebar', {
  navGroups: navGroups,
  activeId: currentPage,
  searchable: true
}) %>

Daraltılmış (icon-only)

Preview
JD
Code
<%- include('modules/app/AppSidebar', {
  navGroups: navGroups,
  activeId:  currentPage,
  collapsed: true
}) %>

Header + node badges

Preview
ACAcme Corp
Code
<%- include('modules/app/AppSidebar', {
  navGroups: [{ label: 'Main', items: [
    { id: 'analytics', label: 'Analytics', badge: 3 },              // a count
    { id: 'team', label: 'Team', badge: '<span class="…">Beta</span>' }, // any badge HTML
  ] }],
  headerContent: function (ctx) { return workspaceSwitcherHtml(ctx.collapsed); }  // above the nav groups
}) %>
Source modules/app/AppSidebar.ejs