Admin Shell
The frame the rest of the dashboard blocks drop into: a collapsible icon sidebar with active-state nav, a topbar with a command-palette trigger and account menu, a greeting header, a three-up KPI row with trend badges, and a recent-orders table.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, badge, avatar, avatar-initials dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/admin-shell.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/dashboard/dashboard1.tsx instead.
Usage
The file also exports dashboard1Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Dashboard1, dashboard1Demo } from "@/components/blocks/dashboard/dashboard1"; export default function Page() { return <Dashboard1 {...dashboard1Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| userName | string | "Jordan" | Name shown in the greeting header and the account menu button. |
| navItems | NavItem[] | none | Sidebar nav entries. Icons are assigned by position (Dashboard, Orders, Customers, Products, Settings order), not passed in as data. |
| kpis | KpiItem[] | none | Three-up KPI tiles rendered above the orders table. |
| orders | OrderRow[] | none | Rows of the recent-orders table. |
| className | string | none | Extra classes for the outer section element. |
Types
type NavItem = { label: string; href: string; active?: boolean }; type KpiItem = { label: string; value: string; delta: string; trend: "up" | "down" }; type OrderRow = { id: string; customer: string; status: "Paid" | "Pending" | "Refunded" | "Failed"; amount: string; date: string; };
Behavior notes
- The sidebar collapse toggle is real client state: clicking the panel icon at the bottom of the rail shrinks it to icon-only width and back, hiding labels while collapsed.
- The sidebar itself is `hidden lg:flex`, matching this category's screen-shell convention; below the lg breakpoint it disappears entirely rather than becoming a drawer.
- The ⌘K search button and the account menu button are both visual only: neither opens a real command palette or dropdown, they're inert buttons styled to communicate the affordance.
- Icons for nav items are a fixed array indexed by position in the code, not a prop, since function/component values can't cross into a "use client" module as props.
- The recent-orders table has no sorting, filtering, or pagination; it renders exactly the rows it's given.
More Dashboard Blocks
View all →customers-table
Customers Table
Sortable, searchable customers table with row selection, pagination, and a per-row action menu.
commerce-analytics
Commerce Analytics
E-commerce analytics dashboard with a four-up KPI row, net-profit area chart, repeat-rate gauge, weekday bar chart, and a best-sellers table.
project-workspace
Project Workspace
Project-management dashboard with a highlighted stats row, weekly hours chart, meeting reminder, team list, progress gauge, and a focus tracker.
booking-workspace
Booking Workspace
Split hotel booking dashboard with tabbed overview, active booking cards, room timelines, and a month calendar with a day agenda.
talent-sourcing
Talent Sourcing
Recruiting project dashboard with a five-up stat strip, stage-filtered candidate pipeline, live search, and per-card wishlist/invite toggles.
traffic-analytics
Traffic Analytics
Web analytics console with a live-visitors strip, an hourly sessions area chart, a channel radar chart, a new-vs-returning line chart, and a sortable top-pages table.