Staaarter

Department Overview Grid

A grid of company department cards. Each card shows the team lead's avatar and name, the department headcount, a badge with the number of open roles, and a View roles link.

By Staaarter Team
Careers
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its avatar, avatar-initials, badge, button dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/department-overview-grid.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/careers/careers18.tsx instead.

Usage

The file also exports careers18Demo, 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 { Careers18, careers18Demo } from "@/components/blocks/careers/careers18";

export default function Page() {
  return <Careers18 {...careers18Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Our departments"Section heading.
descriptionstringnoneSection subheading.
departmentsDepartment[]noneDepartment cards to render.
classNamestringnoneExtra classes for the outer section element.

Types

interface Department {
  id: string;
  name: string;
  headcount: number;
  openRoles: number;
  lead: { name: string; role: string; avatar?: { src: string; alt: string } };
}

Behavior notes

  • Fully static: no client-side state, the grid layout is CSS-only.
  • The View roles button is a link (`render={<Link href="#" />}`) with a placeholder href and does not filter or navigate to a real list.
  • Team lead avatars fall back to initials built from the lead's name when no avatar image is supplied.