Componentnavigation1.1 KB gzipZero dependencies

Admin Shell

Admin panel skeleton: collapsible sidebar nav, top bar, content area.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add admin-shell

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { AdminShell } from "@/components/ui/admin-shell"; <AdminShell />

Source code

admin-shell.tsx + 1 helper

Zero 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 />
PropTypeDescription
brandstringConfigures brand. (Default: "Panel")
navItems{ id: string; label: string; badge?: string | number }[]Configures nav items. (Default: [])
activeIdstringConfigures active id.
onNavigate(id: string) => voidCallback invoked on navigate.
headerRightReact.ReactNodeConfigures header right.
childrenReact.ReactNodeChild elements rendered inside the component.