New: Kith open-sources its ATS.Read why
Skip to Content

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.

What it shows

The files attached to a person or a role.

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.
onFiles (required)(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
name (required)stringThe 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 it needs

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.

Copy to your agent

Copy to your agent
Install RecruiterOS/recruit-ui and add a documents section with a drop zone and a row per file.