# Career 5

> Open roles as full-width rows with apply buttons and an empty state (from Marbrook)

A shadcn/ui block from the [@cnippet-blocks](https://blocks.cnippet.dev/?utm_source=shadcn.exchange) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet-blocks/career-5).

- Page, with a live preview: https://shadcn.exchange/r/cnippet-blocks/career-5
- Screenshot: https://shadcn.exchange/shot/cnippet-blocks/career-5/light.png
- Registry item: https://blocks.cnippet.dev/r/career-5.json
- Categories: career
- Listed: 2026-11-01, source last changed 2026-11-01

## Install

```bash
npx shadcn@latest add https://shadcn.exchange/r/cnippet-blocks/career-5.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `lucide-react`
- Registry items: `@cnippet/badge`, `@cnippet/button`, `@cnippet/empty`, `@cnippet/utils`

## Files

### `registry/default/sections/career-5/index.tsx`

```tsx
import { MapPin } from "lucide-react";
import Link from "next/link";

import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
  Empty,
  EmptyContent,
  EmptyDescription,
  EmptyTitle,
} from "@/components/ui/empty";
import { cn } from "@/lib/utils";

import type { CareerContent } from "../_types/career";
import type { Surface } from "../_types/common";
import { defaultCareer5Content } from "./data";
import { SectionHeader, surfaceClass, toneFor } from "./section-header";

/** Open roles as full-width rows on a hairline rule, each with its own
 *  apply button. Shows an empty state when nothing is open. */
export default function Career5({
  content = defaultCareer5Content,
  surface = "default",
}: {
  content?: CareerContent;
  surface?: Surface;
}) {
  return (
    <section className={cn("py-20 sm:py-28", surfaceClass[surface])}>
      <div className="mx-auto max-w-7xl px-5 sm:px-8 lg:px-12">
        <SectionHeader
          className="border-border border-b pb-8"
          description={content.description}
          eyebrow={content.eyebrow}
          title={content.title}
          tone={toneFor(surface)}
        />

        {content.roles.length > 0 ? (
          <div className="mt-10 grid gap-px overflow-hidden rounded-lg bg-border">
            {content.roles.map((role) => (
              <article
                className="grid gap-6 bg-card p-8 lg:grid-cols-12 lg:items-center lg:gap-12 lg:p-10"
                key={role.title}
              >
                <div className="lg:col-span-8">
                  <div className="flex flex-wrap items-center gap-3">
                    <Badge className="bg-muted px-3 py-1 font-medium text-primary text-xs uppercase tracking-[0.14em]">
                      {role.type}
                    </Badge>
                    <span className="flex items-center gap-1.5 text-muted-foreground text-sm">
                      <MapPin className="size-3.5" />
                      {role.location}
                    </span>
                  </div>
                  <h3 className="mt-4 font-display text-2xl text-primary sm:text-3xl">
                    {role.title}
                  </h3>
                  <p className="mt-3 max-w-2xl text-muted-foreground text-sm leading-relaxed">
                    {role.body}
                  </p>
                </div>

                <div className="lg:col-span-4 lg:justify-self-end">
                  <Button
                    className="w-full border-input bg-background px-7 text-primary shadow-none before:shadow-none hover:bg-muted sm:w-fit"
                    render={<Link href={role.href} />}
                    size="xl"
                    variant="outline"
                  >
                    {content.applyLabel}
                  </Button>
                </div>
              </article>
            ))}
          </div>
        ) : (
          <Empty className="mt-10 rounded-lg border border-border border-dashed bg-card py-16">
            <EmptyTitle className="font-display font-normal text-2xl text-primary">
              {content.empty.title}
            </EmptyTitle>
            <EmptyDescription>{content.empty.description}</EmptyDescription>
            {content.empty.action && (
              <EmptyContent className="mt-6">
                <Button
                  className="border-none bg-primary px-7 text-primary-foreground shadow-none hover:bg-primary/90"
                  render={<Link href={content.empty.action.href} />}
                  size="xl"
                >
                  {content.empty.action.label}
                </Button>
              </EmptyContent>
            )}
          </Empty>
        )}
      </div>
    </section>
  );
}
```

### `registry/default/sections/career-5/data.ts`

```ts
import type { CareerContent } from "../_types/career";

export const defaultCareer5Content: CareerContent = {
  applyLabel: "Apply for this role",
  description: "Written by the person you would report to, not by a recruiter.",
  empty: {
    action: {
      href: "/contact",
      label: "Write to us anyway",
    },
    description:
      "We hire roughly once a year. Write anyway — good letters get kept and answered when something opens.",
    title: "Nothing open at the moment",
  },
  eyebrow: "Open roles",
  roles: [
    {
      body: "You would take the Riverside Quarter book, which is small, slow-moving, and full of houses nobody sells twice in a decade. Suits someone who would rather know fourteen streets properly than four hundred loosely.",
      href: "/contact",
      location: "Harbour District office",
      title: "Advisor, Riverside Quarter",
      type: "Full time",
    },
    {
      body: "Rafael needs a second pair of hands on the managed portfolio — 260 tenancies and growing. Referencing, inspections, and being the person a tenant is glad to reach.",
      href: "/contact",
      location: "Northgate Heights office",
      title: "Lettings coordinator",
      type: "Full time",
    },
    {
      body: "We photograph and film everything in-house. This is the second photographer, shooting four to six properties a week, with the time to wait for the light rather than shoot at noon.",
      href: "/contact",
      location: "Both offices",
      title: "Property photographer",
      type: "Four days a week",
    },
  ],
  title: "3 roles open",
};
```

### `registry/default/sections/career-5/section-header.tsx`

```tsx
import type React from "react";

import { cn } from "@/lib/utils";

import type { Surface } from "../_types/common";

/** The small uppercase label that opens most headers. */
export const eyebrowClass =
  "inline-flex items-center gap-2 font-medium text-[0.6875rem] uppercase tracking-[0.22em]";

export const surfaceClass: Record<Surface, string> = {
  default: "bg-background text-foreground",
  muted: "bg-muted text-foreground",
  primary: "bg-primary text-primary-foreground",
  secondary: "bg-secondary text-secondary-foreground",
};

/**
 * Which band the header sits on. `photo` keeps literal white, because
 * `--primary-foreground` inverts in dark mode and would be unreadable over a
 * photograph.
 */
export type SectionTone = "light" | "photo" | "primary" | "secondary";

export function toneFor(surface: Surface): SectionTone {
  if (surface === "primary") return "primary";
  if (surface === "secondary") return "secondary";
  return "light";
}

const toneClasses: Record<
  SectionTone,
  { eyebrow: string; heading: string; lede: string; tick: string }
> = {
  light: {
    eyebrow: "text-muted-foreground/70",
    heading: "text-primary",
    lede: "text-muted-foreground",
    tick: "bg-secondary",
  },
  photo: {
    eyebrow: "text-white/50",
    heading: "text-white",
    lede: "text-white/65",
    tick: "bg-secondary",
  },
  primary: {
    eyebrow: "text-primary-foreground/40",
    heading: "text-primary-foreground",
    lede: "text-primary-foreground/60",
    tick: "bg-secondary",
  },
  secondary: {
    eyebrow: "text-secondary-foreground/50",
    heading: "text-secondary-foreground",
    lede: "text-secondary-foreground/70",
    tick: "bg-primary",
  },
};

export function SectionHeader({
  action,
  actionAt = "sm",
  className,
  description,
  eyebrow,
  size = "default",
  title,
  tone = "light",
}: {
  /** Rendered beside the heading block once `actionAt` is reached. */
  action?: React.ReactNode;
  /** A text link fits from `sm`; a row of filter tabs needs `lg`. */
  actionAt?: "lg" | "sm";
  className?: string;
  description?: React.ReactNode;
  eyebrow: string;
  /** `sm` is the narrow-sidebar size used by 4/8 splits. */
  size?: "default" | "sm";
  title: React.ReactNode;
  tone?: SectionTone;
}): React.ReactElement {
  const tones = toneClasses[tone];

  return (
    <div
      className={cn(
        action && "flex flex-col gap-6",
        action &&
          (actionAt === "lg"
            ? "gap-8 lg:flex-row lg:items-end lg:justify-between"
            : "sm:flex-row sm:items-end sm:justify-between"),
        className,
      )}
    >
      <div className={cn(action && "max-w-xl")}>
        <p className={cn(eyebrowClass, tones.eyebrow)}>
          <span className={cn("size-1", tones.tick)} />
          {eyebrow}
        </p>

        <h2
          className={cn(
            "mt-5 font-display",
            tones.heading,
            size === "sm"
              ? "text-3xl leading-[1.1] sm:text-4xl"
              : "text-4xl leading-[1.05] sm:text-5xl",
          )}
        >
          {title}
        </h2>

        {description && (
          <p className={cn("mt-4 max-w-xl leading-relaxed", tones.lede)}>
            {description}
          </p>
        )}
      </div>

      {action}
    </div>
  );
}
```

### `registry/default/sections/_types/career.ts`

```ts
import type { LinkAction, SectionIntro } from "./common";

export type CareerContent = SectionIntro & {
  applyLabel: string;
  empty: {
    action?: LinkAction;
    description: string;
    title: string;
  };
  roles: {
    body: string;
    href: string;
    location: string;
    title: string;
    type: string;
  }[];
};
```

### `registry/default/sections/_types/common.ts`

```ts
/**
 * Shapes shared by every token-based section. Each section ships this file
 * alongside its own category types, so installing several sections simply
 * rewrites the same file.
 */

/** Which band a section sits on. A style choice, never part of `content`. */
export type Surface = "default" | "muted" | "primary" | "secondary";

export type ImageAsset = {
  alt: string;
  src: string;
};

export type LinkAction = {
  href: string;
  label: string;
};

/** Eyebrow + heading + optional lede, the header most sections open with. */
export type SectionIntro = {
  description?: string;
  eyebrow: string;
  title: string;
};

/** A figure that counts up when it scrolls into view. */
export type Stat = {
  decimals?: number;
  label: string;
  prefix?: string;
  suffix?: string;
  value: number;
};

/** A figure that is displayed as written ("1,240+", "4.9/5"). */
export type Highlight = {
  label: string;
  value: string;
};

export type FormField = {
  label: string;
  name: string;
  /** Only for `type: "select"`. The first option is the default. */
  options?: string[];
  placeholder?: string;
  required?: boolean;
  /** `full` spans both columns of a two-column form. */
  span?: "full" | "half";
  type?: "email" | "select" | "tel" | "text" | "textarea";
};

export type FormContent = {
  description?: string;
  fields: FormField[];
  note?: string;
  submitLabel: string;
  success: {
    description: string;
    resetLabel: string;
    title: string;
  };
  title: string;
};
```
