@get-asset/react
AssetDocuments
Styled, drop-in documents table — description, file name, date, source, a status dot, and a type chip per row. A drag-and-drop upload zone (desktop) / header upload button (mobile) sits above the list; use the kebab for Preview / Download / Delete, with Delete opening an inline confirm and Preview opening the full-screen lightbox. Responsive via a container query; covers loading, error, empty, and success.
Built on the headless Documents compound from @get-asset/sdk.
Preview
Documents
Drag and Drop or to Upload
PDF, JPG, PNG, XLS, CSV, TXT, or HEIC. Max 25 MB per file.
Required scopes
The access token used by AssetProvider must include these scopes for this primitive to fetch data successfully:
document:readdocument:createdocument:delete
API reference
Root props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | Override the card heading. Defaults to "Documents". |
uploadHint | string | — | Override the dropzone hint copy (file types + size limit). |
documentType | DocumentType | — | Filter by type (receipt / statement / payroll / bill / mileage / other). Passed to the API. |
transactionId | string | — | Filter to documents linked to a transaction. Passed to the API. |
onUpload | (type?: DocumentType) => void | — | Provide to handle uploads yourself — the built-in dropzone upload is skipped. |
onDelete | (documentId: string) => void | — | Provide to handle deletion yourself — the built-in delete mutation is skipped. |
onDownload | (documentId: string) => void | — | Provide to handle download yourself — the built-in signed-URL download is skipped. |
documents | DocumentPublic[] | — | Override fetched data (skips the API call). |
state | "loading" | "error" | "empty" | — | Force a specific state for testing. |
uploadItems | UploadItem[] | — | Seed the upload queue for previews/tests; supports uploading, success, and error chips. |
signedUrlOverride | string | — | Use this URL for the preview lightbox, skipping the signed-URL fetch. |
className | string | — | Forwarded to the outer Card wrapper element. |
States
Documents
Drag and Drop or to Upload
PDF, JPG, PNG, XLS, CSV, TXT, or HEIC. Max 25 MB per file.
Documents
Documents
Drag and Drop or to Upload
PDF, JPG, PNG, XLS, CSV, TXT, or HEIC. Max 25 MB per file.
Documents
Drag and Drop or to Upload
PDF, JPG, PNG, XLS, CSV, TXT, or HEIC. Max 25 MB per file.
Documents
Drag and Drop or to Upload
PDF, JPG, PNG, XLS, CSV, TXT, or HEIC. Max 25 MB per file.