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 agent
Install RecruiterOS/recruit-ui and add a documents section with a drop zone and a row per file.With the shadcn CLI
pnpm dlx shadcn@latest add RecruiterOS/recruit-ui/recruit-workflowsProps
DocumentUploadPanel
| Prop | Type | What it does |
|---|---|---|
| title | ReactNode | The section heading. Defaults to "Documents". |
| count | number | How many documents there are, as DocumentList takes it. The compact header shows it beside the title while it is above zero. |
| loading | boolean | A skeleton row in place of the list, and no count yet. |
| error | ReactNode | A 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. |
| uploading | boolean | Shows the drop zone busy, with `labels.uploading`. |
| accept | string | The file types the picker offers, as the input's `accept`. |
| kindSelect | DocumentKindSelect<TValue> | Adds a select to the header for the kind the next upload is filed as. |
| empty | CandidateEmptyCopy | The blank slate's wording. Defaults to "No documents yet". |
| density | DocumentListDensity | |
| border | "none" | "top" | "bottom" | The compact panel's divider, as the kit PanelSection takes it. Defaults to `bottom`. |
| labels | Partial<DocumentUploadPanelLabels> | |
| preview | DocumentPreviewProps | Controlled document preview. The host owns URL loading, authorization and download callbacks. |
| children | ReactNode | The documents, usually DocumentListItems with the same `density`. |
DocumentListItem
| Prop | Type | What it does |
|---|---|---|
| namerequired | string | The file name. It is the row's title and names each action for screen readers. |
| kind | DocumentKind | What kind of document this is, as a badge after the name. |
| meta | ReactNode | A muted line beside the kind, such as the size and when it was added. |
| summary | ReactNode | A short summary of what the document says, under the name. |
| processing | boolean | Still being read: a spinner and `labels.processing` stand in for a missing `summary`. |
| onPreview | () => void | Adds 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. |
| downloading | boolean | Shows 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. |
| reanalysing | boolean | Shows 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. |
| density | DocumentListDensity | |
| labels | Partial<DocumentListItemLabels> |
DocumentList
| Prop | Type | What it does |
|---|---|---|
| count | number | How 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. |
| loading | boolean | A skeleton row in place of the list. |
| empty | CandidateEmptyCopy | The blank slate's wording. Defaults to "No documents yet". |
| density | DocumentListDensity | |
| children | ReactNode | The 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.