Sidebar
The main navigation sidebar component for the application.
π Overviewβ
| Property | Value |
|---|---|
| File | src/components/Sidebar.tsx |
| Type | React Functional Component |
| Author | UIP Team |
| Version | 1.0.0 |
π― Purposeβ
- Main application navigation
- Quick access to features
- User profile and settings
- Collapsible for more space
π Usageβ
import { Sidebar } from '@/components/Sidebar';
function Layout() {
return (
<div className="flex">
<Sidebar
collapsed={isSidebarCollapsed}
onToggle={() => setCollapsed(!isSidebarCollapsed)}
/>
<main className="flex-1">
{children}
</main>
</div>
);
}
π¦ Propsβ
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
collapsed | boolean | No | false | Collapsed state |
onToggle | () => void | No | - | Toggle handler |
activeItem | string | No | - | Active nav item |
π Navigation Itemsβ
| Item | Icon | Route |
|---|---|---|
| Dashboard | π | /dashboard |
| Traffic Map | πΊοΈ | /map |
| Analytics | π | /analytics |
| Reports | π | /reports |
| Settings | βοΈ | /settings |
π Related Componentsβ
- ConnectionStatus - Status display
- FilterPanel - Filters
See the complete components reference for all available components.