recruit/document-list · DocumentList

Document list

The files attached to a person or a role: a drop zone, each file with its kind and a short summary, and preview, download, re-analyse and delete.

Documents

founding-gtm-engineer-brief.pdf

Role brief242 KB · 6 days ago

Founding GTM engineer for a seed-stage team; hybrid in London, two days a week in the office.

intake-call-notes.md

Intake notes9 KB · 4 days ago

Has to have built outbound from scratch; the hiring manager wants a second interview with the team.

Install

With your coding agentInstall RecruiterOS/recruit-ui and add a documents section with a drop zone and a row per file.
With the shadcn CLIpnpm dlx shadcn@latest add RecruiterOS/recruit-ui/recruit-workflows

Props

DocumentUploadPanel

PropTypeWhat it does
titleReactNodeThe section heading. Defaults to "Documents".
countnumberHow many documents there are, as DocumentList takes it. The compact header shows it beside the title while it is above zero.
loadingbooleanA skeleton row in place of the list, and no count yet.
errorReactNodeA failed load, upload or delete, above the drop zone.
onFilesrequired(files: File[]) => void | Promise<void>Called with the files a person drops or picks; the host uploads them.
uploadingbooleanShows the drop zone busy, with `labels.uploading`.
acceptstringThe file types the picker offers, as the input's `accept`.
kindSelectDocumentKindSelect<TValue>Adds a select to the header for the kind the next upload is filed as.
emptyCandidateEmptyCopyThe blank slate's wording. Defaults to "No documents yet".
densityDocumentListDensity
border"none" | "top" | "bottom"The compact panel's divider, as the kit PanelSection takes it. Defaults to `bottom`.
labelsPartial<DocumentUploadPanelLabels>
previewDocumentPreviewPropsControlled document preview. The host owns URL loading, authorization and download callbacks.
childrenReactNodeThe documents, usually DocumentListItems with the same `density`.

DocumentListItem

PropTypeWhat it does
namerequiredstringThe file name. It is the row's title and names each action for screen readers.
kindDocumentKindWhat kind of document this is, as a badge after the name.
metaReactNodeA muted line beside the kind, such as the size and when it was added.
summaryReactNodeA short summary of what the document says, under the name.
processingbooleanStill being read: a spinner and `labels.processing` stand in for a missing `summary`.
onPreview() => voidAdds a preview button, such as for a file the host can show inline.
onDownload() => void | Promise<unknown>Adds a download button. A returned promise shows a spinner until it settles.
downloadingbooleanShows the download button's spinner, such as while another control downloads the file.
onReanalyse() => void | Promise<unknown>Adds a re-analyse button. A returned promise shows a spinner until it settles.
reanalysingbooleanShows the re-analyse button's spinner.
onDelete() => void | Promise<unknown>Adds a delete button, which asks to confirm in the row before calling this. A returned promise disables the confirm button until it settles.
densityDocumentListDensity
labelsPartial<DocumentListItemLabels>

DocumentList

PropTypeWhat it does
countnumberHow many documents there are. Zero shows the empty state in place of the rows. Left out, such as before the first load succeeds, the list shows only what `children` holds.
loadingbooleanA skeleton row in place of the list.
emptyCandidateEmptyCopyThe blank slate's wording. Defaults to "No documents yet".
densityDocumentListDensity
childrenReactNodeThe documents, usually DocumentListItems with the same `density`.

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.