Componentnavigation1.6 KB gzipZero dependencies
Sidebar
Collapsible navigation sidebar drawer with notch cutouts.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add sidebarOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { Sidebar } from "@/components/ui/sidebar"; <Sidebar brand="BIGBULL ARENA" activeId="dashboard" />Source code
sidebar.tsx + 2 helpersZero third-party dependencies (3 local files shown in tabs below).
tsxsidebar.tsx220 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils";import { registerEscapeLayer } from "./lib/focus-trap"; export interface SidebarItemData { id: string; label: string; badge?: string; active?: boolean;} export interface SidebarGroupData { title: string; items: SidebarItemData[];} Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { Sidebar } from "@/components/ui/sidebar"; <Sidebar />| Prop | Type | Description |
|---|---|---|
| brand | string | Configures brand. (Default: "BIGBULL ARENA") |
| ticketCode | string | Configures ticket code. (Default: "SEC-08") |
| footerLabel | string | Configures footer label. (Default: "System online") |
| showStatusDot | boolean | Toggles show status dot. (Default: true) |
| groups | SidebarGroupData[] | Configures groups. (Default: DEFAULT_GROUPS) |
| collapsed | boolean | Toggles collapsed. |
| onCollapsedChange | (collapsed: boolean) => void | Callback invoked on collapsed change. |
| mobileOpen | boolean | Toggles mobile open. (Default: false) |
| onMobileOpenChange | (open: boolean) => void | Callback invoked on mobile open change. |
| activeId | string | Configures active id. |
| onSelect | (id: string) => void | Callback invoked on select. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |