Staaarter

Role Comparison Table

A side-by-side comparison of open roles rendered as a real `<table>` (Role, Team, Skills, Experience, Salary range columns), shown from `sm:` up inside a horizontally scrollable container. On smaller screens the same data renders as stacked definition-list cards, one per role, instead of a cramped table.

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 dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/role-comparison-table.json

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

Usage

The file also exports careers31Demo, 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 { Careers31, careers31Demo } from "@/components/blocks/careers/careers31";

export default function Page() {
  return <Careers31 {...careers31Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Compare open roles"Section heading.
descriptionstring"A side-by-side look at team, required skills..."Section subheading.
rolesRoleComparison[]noneRows to render in both the table and mobile card views.
classNamestringnoneExtra classes for the outer section element.

Types

interface RoleComparison {
  role: string;
  team: string;
  skills: string;
  experience: string;
  salaryRange: string;
}

Behavior notes

  • Fully static. The table (`hidden sm:table` inside an `overflow-x-auto` wrapper) and the mobile card list (`sm:hidden`) render from the exact same `roles` data, no JavaScript toggling involved, purely responsive CSS.