Roles By Department
A department filter for open roles: an uncontrolled Tabs list switches between departments (Design, Engineering, Production, Operations), each TabsContent showing that department's open role list, or an empty-state message when a department has no openings.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its tabs, button, badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/roles-by-department.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/careers/careers44.tsx instead.
Usage
The file also exports careers44Demo, 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 { Careers44, careers44Demo } from "@/components/blocks/careers/careers44"; export default function Page() { return <Careers44 {...careers44Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Roles by department" | Section heading. |
| description | string | none | Section intro paragraph. |
| departments | Department[] | none | Departments, each with its own tab value, label, and role list. |
| defaultDepartment | string | departments[0]?.value | Which department tab is active by default. |
| className | string | none | Extra classes for the outer section element. |
Types
type DepartmentRole = { id: string; title: string; location: string; type: string; }; type Department = { value: string; label: string; roles: DepartmentRole[]; };
Behavior notes
- Tab switching is real: Tabs is used uncontrolled (defaultValue only), so clicking a department tab genuinely swaps which role list is shown, but the block itself stays a Server Component since nothing else reads the active tab value.
- Every role's Apply button is a decorative link (`render={<Link href="#" />}`) with a placeholder href, nothing is submitted anywhere.
- A department with an empty roles array renders a dashed empty-state message instead of an empty list.
More Careers Blocks
View all →job-listings-list
Job Listings List
A vertical list of open roles with department badge, location, employment type, and an apply link per row.
job-openings-grid
Job Openings Grid
A responsive card grid of open roles with department badge, location, employment type, and an apply link.
department-grouped-positions
Department-Grouped Positions
Open jobs grouped under department headings with minimal single-line rows for title, location, and type.
perks-open-positions
Perks & Open Positions
A benefits icon grid followed by a list of open positions with title, department, and location.
featured-role-with-positions
Featured Role with Positions
A larger featured job card with a 'Hiring now' badge, followed by a compact list of additional openings.
tab-filtered-job-board
Tab-Filtered Job Board
Department tabs (All/Engineering/Design/Marketing) that filter which job list is shown.