Sidebar

App sidebar shell with a collapsed icon-only width and SidebarNavItem buttons that show icons, truncated labels and an active state. Built with Tailwind.

src/registry/ui/sidebar.tsx/r/sidebar.json

Installation#

bash
npx shadcn@latest add @minidev/sidebar

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/sidebar.json

Usage#

tsx
import { Sidebar } from "@/components/ui/sidebar"

export function Example() {
  return (
    <Sidebar><div className="p-3 text-xs font-medium text-fg-muted">MiniDev</div><SidebarNavItem active>Overview</SidebarNavItem><SidebarNavItem>Projects</SidebarNavItem></Sidebar>
  )
}

API reference#

Sidebar props
PropTypeDefault
children*React.ReactNode-
classNamestring-
collapsedbooleanfalse

* required

Examples#

All navigation components

Learn more