Navigation
SidebarNav
Grouped sidebar with collapsible sub-items, badges, and active link highlight.
Quick Preview
Installation
// Copy fromsrc/components/navigation/SidebarNav.tsx
Usage
import SidebarNav from '@/components/navigation/SidebarNav'const groups = [{title: 'Overview',items: [{ icon: '๐ ', label: 'Dashboard', href: '/dashboard' },{ icon: '๐', label: 'Analytics', href: '/analytics' },{ icon: '๐ฐ', label: 'Revenue', href: '/revenue', badge: 3 },],},{title: 'Settings',items: [{ icon: 'โ๏ธ', label: 'General', href: '/settings' },],},]export default function Sidebar() {return <SidebarNav groups={groups} activeHref="/dashboard" />}
Examples
Active: Tasks (with badge)
Badge shows unread count; active item is highlighted with primary color
Collapsible children
Click Team to expand nested sub-items
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
groups* | SidebarNavGroup[] | - | Array of {title?, items[]} |
activeHref | string | - | Active route href for highlight |