nyuchimzizi
Mzizi — an open-architecture project of the Bundu Foundation, operated and developed by Nyuchi. Built on the Five African Minerals palette.
Built by Nyuchi Africav4.0.39
Collapsible sidebar with grouped sections.
No interactive demo is registered for this component yet — the source is shown directly.
"use client"
import { useState } from "react"
import { Button } from "@/components/ui/button"
import { Separator } from "@/components/ui/separator"
import {
ChevronDown,
Home,
BarChart3,
Users,
FileText,
Settings,
Zap,
ShoppingCart,
CreditCard,
} from "@/lib/icons"
const sections = [
{
title: "Overview",
items: [
{ icon: Home, label: "Home" },
{ icon: BarChart3, label: "Analytics" },
],
},
{
title: "Management",
items: [
{ icon: Users, label: "Team" },
{ icon: FileText, label: "Documents" },
{ icon: ShoppingCart, label: "Orders" },
],
},
{
title: "Billing",
items: [
{ icon: CreditCard, label: "Payments" },
{ icon: Settings, label: "Settings" },
],
},
]
function Sidebar02() {
const [collapsed, setCollapsed] = useState<Record<string, boolean>>({})
const toggle = (title: string) => setCollapsed((prev) => ({ ...prev, [title]: !prev[title] }))
return (
<aside data-slot="sidebar-block" data-portal="https://design.nyuchi.com/components/sidebar-block" aria-label="Sidebar navigation" className="flex h-screen w-60 flex-col border-r border-border bg-card">
<div className="flex h-14 items-center gap-2 px-4">
<Zap className="size-5 text-cobalt" />
<span className="font-serif text-lg font-semibold text-foreground">mukoko</span>
</div>
<Separator />
<nav className="flex-1 overflow-auto p-3">
{sections.map((section) => (
<div key={section.title} className="mb-2">
<button
onClick={() => toggle(section.title)}
className="flex w-full items-center justify-between rounded-[var(--radius-md,12px)] px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground"
>
{section.title}
<ChevronDown
className={`size-3 transition-transform ${collapsed[section.title] ? "-rotate-90" : ""}`}
/>
</button>
{!collapsed[section.title] && (
<div className="mt-1 space-y-0.5">
{section.items.map((item) => (
<Button
key={item.label}
variant="ghost"
className="w-full justify-start gap-3"
size="sm"
>
<item.icon className="size-4" />
{item.label}
</Button>
))}
</div>
)}
</div>
))}
</nav>
</aside>
)
}
export { Sidebar02 }
The variants, sizes, and props surfaced by the registry. Each is sourced from the Supabase component_docs table.
Hit the registry API live and see the JSON the shadcn CLI consumes when it installs this component.
/api/v1/ui/sidebar-02npx shadcn@latest add https://mzizi.dev/api/v1/ui/sidebar-02components/blocks/sidebar-02.tsx