# Careers: open role list

> A list of roles with team, location, employment type and optional detail links.

- Kind: block · Category: Careers · Interactivity: native
- Install: `npx shadcn@latest add @haze/careers-role-list`
- File: `src/components/haze/blocks/careers-role-list.astro`
- npm dependencies: @lucide/astro
- Registry dependencies: @haze/utils
- Docs page: https://hazeui.com/blocks/careers-role-list

## Use when
- Presenting a small set of current job openings
- Applicants need to scan location and role type before opening a listing

## Avoid when
- Introducing existing teammates rather than open roles; use team-profile-grid

## Alternatives
- [team-profile-grid](https://hazeui.com/blocks/team-profile-grid.md)

## Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| id | `string` | "careers-role-list" | no | Unique ID prefix for the section heading. |
| eyebrow | `string` | "Careers" | no | Label above the title. |
| title | `string` | demo heading | no | Careers section heading. |
| description | `string` | demo copy | no | Introduction; the default identifies the sample roles as examples. |
| headingLevel | `1 \| 2 \| 3` | 2 | no | Heading level; role titles use the next level. |
| roles | `{ title: string; team: string; location: string; type: string; href?: string }[]` | 3 example roles | no | Roles to display; provide href for a working listing link. |
| class | `string` |  | no | Additional section classes. |

## Accessibility
- Role titles are headings in a list; location and employment type are visible text.
- The arrow and location icons are decorative and hidden from assistive technology.
- Key Tab: Move between role links when URLs are provided.

## Agent prompts

### Install and use

Install the Haze UI block "Careers: open role list" with `npx shadcn@latest add @haze/careers-role-list`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "https://hazeui.com/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import CareersRoleList from "@/components/haze/blocks/careers-role-list.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: https://hazeui.com/blocks/careers-role-list.md

### Customize with real content

Adapt the Haze careers-role-list block for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, headingLevel, roles, class. Keep the layout, the heading level rules and these accessibility details: Role titles are headings in a list; location and employment type are visible text. The arrow and location icons are decorative and hidden from assistive technology. Do not add raw color classes; use the Haze tokens.

### Choose the right block

Before using careers-role-list, check it fits: use it when presenting a small set of current job openings; applicants need to scan location and role type before opening a listing. Avoid it when introducing existing teammates rather than open roles; use team-profile-grid. Alternatives: @haze/team-profile-grid.

## Example requests that should lead here
- List current job openings with the team, location and role type

## Source

```astro
---
import { ArrowUpRight, MapPin } from "@lucide/astro";
import { cn } from "../../../lib/haze/utils";

interface Props {
  id?: string;
  eyebrow?: string;
  title?: string;
  description?: string;
  headingLevel?: 1 | 2 | 3;
  roles?: { title: string; team: string; location: string; type: string; href?: string }[];
  class?: string;
}

const {
  id = "careers-role-list",
  eyebrow = "Careers",
  title = "Do thoughtful work with us",
  description = "These example roles show how to share openings with the people who might be a great fit.",
  headingLevel = 2,
  roles = [
    { title: "Senior product designer", team: "Design", location: "Remote", type: "Full time" },
    { title: "Frontend engineer", team: "Engineering", location: "Remote", type: "Full time" },
    { title: "Customer experience lead", team: "Customer experience", location: "London or remote", type: "Full time" },
  ],
  class: className,
} = Astro.props;
const Heading = ({ 1: "h1", 2: "h2", 3: "h3" } as const)[headingLevel];
const RoleHeading = ({ 1: "h2", 2: "h3", 3: "h4" } as const)[headingLevel];
---

<section aria-labelledby={`${id}-title`} class={cn("bg-background px-6 py-20 sm:py-24", className)}>
  <div class="mx-auto max-w-6xl">
    <div class="max-w-2xl">
      <p class="text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">{eyebrow}</p>
      <Heading id={`${id}-title`} class="mt-3 text-3xl/9 font-semibold tracking-tight text-balance text-foreground sm:text-4xl/11">{title}</Heading>
      <p class="mt-4 text-base/7 text-pretty text-muted-foreground">{description}</p>
    </div>
    <ul class="mt-12 divide-y divide-border border-y border-border">
      {roles.map((role) => (
        <li class="flex flex-col gap-3 py-6 sm:flex-row sm:items-center sm:justify-between sm:gap-8">
          <div class="min-w-0">
            <p class="text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">{role.team}</p>
            <RoleHeading class="mt-2 text-base/6 font-semibold tracking-tight text-foreground">
              {role.href ? <a href={role.href} class="rounded-sm underline-offset-4 hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring">{role.title}<ArrowUpRight aria-hidden="true" class="ml-1 inline size-4" /></a> : role.title}
            </RoleHeading>
          </div>
          <div class="flex flex-wrap items-center gap-x-4 gap-y-2 text-[0.8125rem]/5 text-muted-foreground">
            <span class="inline-flex items-center gap-1.5"><MapPin aria-hidden="true" class="size-4" />{role.location}</span>
            <span class="rounded-sm bg-foreground/5 px-2 py-1 inset-ring inset-ring-frame">{role.type}</span>
          </div>
        </li>
      ))}
    </ul>
  </div>
</section>
```
