Componentnavigation1.1 KB gzipZero dependencies
Admin Shell
Admin panel skeleton: collapsible sidebar nav, top bar, content area.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add admin-shellOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { AdminShell } from "@/components/ui/admin-shell"; <AdminShell />Source code
admin-shell.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxadmin-shell.tsx80 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface AdminShellProps extends React.HTMLAttributes<HTMLDivElement> { brand?: string; navItems?: { id: string; label: string; badge?: string | number }[]; activeId?: string; onNavigate?: (id: string) => void; headerRight?: React.ReactNode; children?: React.ReactNode;} /** Admin shell layout: collapsible sidebar + topbar + content. */export function AdminShell({ brand = "Panel", navItems = [], activeId, onNavigate, headerRight, children, className, ...props }: AdminShellProps) { const [collapsed, setCollapsed] = React.useState(false); const [internalActive, setInternalActive] = React.useState(activeId ?? navItems[0]?.id);Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { AdminShell } from "@/components/ui/admin-shell"; <AdminShell />| Prop | Type | Description |
|---|---|---|
| brand | string | Configures brand. (Default: "Panel") |
| navItems | { id: string; label: string; badge?: string | number }[] | Configures nav items. (Default: []) |
| activeId | string | Configures active id. |
| onNavigate | (id: string) => void | Callback invoked on navigate. |
| headerRight | React.ReactNode | Configures header right. |
| children | React.ReactNode | Child elements rendered inside the component. |