MCPcopy
hub / github.com/salimi-my/shadcn-ui-sidebar

github.com/salimi-my/shadcn-ui-sidebar @main sqlite

repository ↗ · DeepWiki ↗
42 symbols 169 edges 45 files 0 documented · 0%
README

shadcn/ui sidebar · Author Salimi

A stunning and functional retractable sidebar for Next.js built on top of shadcn/ui complete with desktop and mobile responsiveness.

Features

  • Retractable mini and wide sidebar
  • Scrollable sidebar menu
  • Sheet menu for mobile
  • Grouped menu with labels
  • Collapsible submenu
  • Extracted menu items list

Tech/framework used

  • Next.js 14
  • Shadcn/ui
  • Tailwind CSS
  • TypeScript
  • Zustand

Installation

Custom registry

If you are using @shadcn/ui 2.0.0 or later, you can install the component directly from the registry.

npx shadcn@latest add https://raw.githubusercontent.com/salimi-my/shadcn-ui-sidebar/refs/heads/master/public/registry/shadcn-sidebar.json

or

npx shadcn@latest add https://shadcn-ui-sidebar.salimi.my/registry/shadcn-sidebar.json

Usage example for Nextjs

//layout.tsx
import AdminPanelLayout from "@/components/admin-panel/admin-panel-layout";

export default async function Layout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return <AdminPanelLayout>{children}</AdminPanelLayout>;
}

//page.tsx
import { ContentLayout } from "@/components/admin-panel/content-layout";

export default function Page() {
  return (
    <ContentLayout title="Test">


Test


    </ContentLayout>
  );
}

Starting the project locally

  1. Clone the repository

bash git clone https://github.com/salimi-my/shadcn-ui-sidebar

  1. Install dependencies

bash cd shadcn-ui-sidebar npm install

  1. Run the development server

bash npm run dev

Demo

The app is hosted on Vercel. Click here to visit.

Direct demo link: https://shadcn-ui-sidebar.salimi.my

Screenshots

Light mode

Light mode

Dark mode

Dark mode

Mini sidebar

Mini sidebar

Sheet menu

Extension points exported contracts — how you extend this code

SheetContentProps (Interface)
(no doc)
src/components/ui/sheet.tsx
ButtonProps (Interface)
(no doc)
src/components/ui/button.tsx
ContentLayoutProps (Interface)
(no doc)
src/components/admin-panel/content-layout.tsx
MenuProps (Interface)
(no doc)
src/components/admin-panel/menu.tsx
CollapseMenuButtonProps (Interface)
(no doc)
src/components/admin-panel/collapse-menu-button.tsx

Core symbols most depended-on inside this repo

cn
called by 53
src/lib/utils.ts
useStore
called by 3
src/hooks/use-store.ts
getAllFiles
called by 2
registry/registry-components.ts
getMenuList
called by 1
src/lib/menu-list.ts
writeFileRecursive
called by 1
scripts/build-registry.ts
getComponentFiles
called by 1
scripts/build-registry.ts
main
called by 1
scripts/build-registry.ts
ModeToggle
called by 0
src/components/mode-toggle.tsx

Shape

Function 35
Interface 7

Languages

TypeScript100%

Modules by API surface

src/components/ui/sheet.tsx3 symbols
scripts/build-registry.ts3 symbols
src/components/ui/breadcrumb.tsx2 symbols
src/components/admin-panel/sidebar-toggle.tsx2 symbols
src/components/admin-panel/navbar.tsx2 symbols
src/components/admin-panel/menu.tsx2 symbols
src/components/admin-panel/content-layout.tsx2 symbols
src/components/admin-panel/collapse-menu-button.tsx2 symbols
src/lib/utils.ts1 symbols
src/lib/menu-list.ts1 symbols
src/hooks/use-store.ts1 symbols
src/components/ui/dropdown-menu.tsx1 symbols

Dependencies from manifests, versioned

@radix-ui/react-avatar1.0.4 · 1×
@radix-ui/react-collapsible1.0.3 · 1×
@radix-ui/react-dialog1.0.5 · 1×
@radix-ui/react-dropdown-menu2.0.6 · 1×
@radix-ui/react-icons1.3.0 · 1×
@radix-ui/react-label2.1.0 · 1×
@radix-ui/react-scroll-area1.0.5 · 1×
@radix-ui/react-slot1.0.2 · 1×
@radix-ui/react-switch1.1.1 · 1×
@types/node20 · 1×
@types/react18 · 1×

For agents

$ claude mcp add shadcn-ui-sidebar \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact