recruit/candidate-add-to-job-popover · CandidateAddToJobPopover
Add to job popover
Adds one or more people to a job: pick the job and the stage they land at, then confirm. Optionally, have them assessed instead.
Riley Okafor · GTM Engineer
Pick a job and a stage, then confirm.
Install
With your coding agent
Install RecruiterOS/recruit-ui and add an add to job popover that picks the job and the stage.With the shadcn CLI
pnpm dlx shadcn@latest add RecruiterOS/recruit-ui/recruit-workflowsProps
| Prop | Type | What it does |
|---|---|---|
| jobsrequired | readonly CandidateAddToJobOption<TJob>[] | The jobs people can be added to, in order. |
| stagesrequired | readonly CandidateAddToJobOption<TStage>[] | The stages they can land at, in order. |
| defaultStage | TStage | The stage picked each time the popover opens. Defaults to the first stage, as does a value `stages` doesn't list. |
| defaultJob | TJob | The job picked each time the popover opens, such as a suggested match. A value `jobs` doesn't list, such as a job the person was just added to and the host has since left out, counts as no pick. |
| count | number | How many people this adds; the default heading says so when it is more than one. |
| onConfirmrequired | (job: TJob, stage: TStage) => void | Promise<void> | Adds the people to the picked job at the picked stage. The popover closes once it settles; if it throws, it stays open with its choices, so report the failure here. |
| assessors | readonly CandidateAddToJobOption<TAssessor>[] | Who or what can assess people for the job instead of a stage being set, such as a screening checklist. With `onAssess`, a toggle offers this second mode. |
| onAssess | (job: TJob, assessor: TAssessor) => void | Promise<void> | Adds the people to the job and has the picked assessor assess them. |
| assessIcon | ElementType | The assess mode's glyph, on its toggle and submit button. |
| trigger | ReactNode | The element that opens the popover. Defaults to an outline "Add to job" button. |
| align | "start" | "center" | "end" | Where the popover lines up with its trigger. Defaults to `start`. |
| empty | CandidateEmptyCopy | The empty state inside the job select when there are no jobs. |
| labels | Partial<CandidateAddToJobPopoverLabels> |
Data
The component takes plain values and callbacks and keeps no records of its own. Pass it yours, from the Kith data layer or from a backend you already run.