recruit/candidate-pipeline-board · CandidatePipelineBoard

Pipeline board

A job's pipeline as a board: a column for each stage and a card for each person, moved by a drag or from the card's move menu, with each move saved by your app.

Sourced1

Shortlisted1

Interview1

Drag a card to another stage, or use its move menu.

Install

With your coding agentInstall RecruiterOS/recruit-ui and add a pipeline board with a column per stage and cards that move between them.
With the shadcn CLIpnpm dlx shadcn@latest add RecruiterOS/recruit-ui/recruit-workflows

Props

PropTypeWhat it does
columnsrequiredreadonly CandidatePipelineBoardColumn[]The stages, in pipeline order.
itemsrequiredreadonly T[] | undefinedThe people on the board, in the order each column lists them. A person whose stage is not one of `columns` is not shown.
getIdrequired(item: T) => string | numberA stable id for each person's card.
getStagerequired(item: T) => stringThe id of the column the person is in.
getNamerequired(item: T) => stringThe person's name: on the default card, and how their move menu and the board's announcements name them whoever draws the card.
renderCard(item: T, stage: string) => ReactNodeDraws a person's card, given the stage it is shown in. Defaults to a `CandidatePipelineCard` with the name, which calls `onSelect`. The card needs no wrapper and no drag handling of its own.
onSelect(item: T) => voidCalled when the default card is activated, usually to open the person.
onMove(item: T, toStage: string) => unknownMakes the cards movable, and is called with the person and the stage they were moved to, by a drag or from the card's move menu. The host saves the move. If it returns a promise, the card shows in the new stage at once. If the promise rejects, the card goes back to where `getStage` puts it. Once it resolves, the card stays where it was moved until the host says something new about the person, by passing another record for them or changing their stage, and `getStage` decides from then on. A callback that returns nothing leaves the card where `getStage` puts it throughout.
loadingbooleanSkeleton cards in each column that has nobody to show yet.
errorReactNodeA failed load, worded by the host, in place of the columns.
emptyCandidateEmptyCopyThe blank slate when the board holds nobody. Defaults to "No candidates yet".
narrowedbooleanWhether a search or a filter is narrowing the board, which words the blank slates ("No matches", not "No candidates"). Worked out from `searchTerm` and `filters` when left out.
columnWidthCandidatePipelineBoardColumnWidth`wide` (the default) is 400px, or the screen's width if less; `narrow` is 280px.
heightCandidatePipelineBoardHeight`viewport` (the default) fills the screen's height, each column scrolling under its own heading, so the headings and the sideways scrollbar stay in view. `content` grows with the longest column.
columnHeadingLevel2 | 3 | 4The column headings' level: 3 (the default), or 2 or 4 to fit the page's outline.
labelsPartial<CandidatePipelineBoardLabels>

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.