Staaarter

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.

By Staaarter Team
Dashboard
Docs
Live preview

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.json

Prefer 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

PropTypeDefaultDescription
userNamestring"Jordan"Name shown in the greeting header and the account menu button.
navItemsNavItem[]noneSidebar nav entries. Icons are assigned by position (Dashboard, Orders, Customers, Products, Settings order), not passed in as data.
kpisKpiItem[]noneThree-up KPI tiles rendered above the orders table.
ordersOrderRow[]noneRows of the recent-orders table.
classNamestringnoneExtra 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.