Skip to content

Data display

Job card

A job summary: role, company, essentials, match and actions.

import { JobCard } from '@jsonresume/ui'Source(opens in a new tab)

Examples

Job list
Show code
job-card/list.tsx
'use client';

import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuTrigger,
  Button,
  Grid,
  JobCard,
  StatusToggle,
} from '@jsonresume/ui';
import { MoreHorizontal } from 'lucide-react';
import { useState } from 'react';

export default function JobCardList() {
  const [status, setStatus] = useState<string | null>(null);
  return (
    <Grid minColumnWidth="18rem" gap={4}>
      <JobCard
        title="Senior Engineer, Payments"
        company="Stripe"
        href="#job-1"
        location="San Francisco"
        remote
        salary="$180k–$220k"
        posted="3 days ago"
        match={87}
        tags={['Go', 'Kafka', 'Postgres']}
        actions={
          <>
            <StatusToggle
              label="Status for Senior Engineer at Stripe"
              value={status}
              onValueChange={setStatus}
              options={[
                { value: 'interested', label: 'Interested' },
                { value: 'hidden', label: 'Hide' },
              ]}
            />
            <DropdownMenu>
              <DropdownMenuTrigger asChild>
                <Button variant="ghost" size="icon" aria-label="More actions">
                  <MoreHorizontal aria-hidden="true" />
                </Button>
              </DropdownMenuTrigger>
              <DropdownMenuContent>
                <DropdownMenuItem>Write cover letter</DropdownMenuItem>
                <DropdownMenuItem>Copy link</DropdownMenuItem>
              </DropdownMenuContent>
            </DropdownMenu>
          </>
        }
      />
      <JobCard
        title="Staff Frontend Engineer"
        company="Vercel"
        href="#job-2"
        remote
        salary="$200k+"
        posted="1 week ago"
        match={72}
        tags={['React', 'Next.js']}
      />
    </Grid>
  );
}

Accessibility

  • An article whose title is the single link; the whole card is clickable through it.
  • Footer controls stay separately focusable.

Props

<JobCard>

Also accepts the attributes of the element JobCard renders.
PropTypeDefaultDescription
company requiredstring–
title requiredstring–
actionsReactNode–Footer controls: status toggles, actions menu.
headingLevel2343
hrefstring–Link to the job; the whole card becomes clickable through it.
locationstring–
matchnumber–0–100 match with the reader's resume.
postedstring–Free text such as "3 days ago".
remoteboolean–
salarystring–
tagsstring[][]