Upload Wait

Upload Wait is a copy-paste React component that stops form submitted before upload finished before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/upload-wait
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsForm submitted before upload finished

Was this component page useful?

How do I install Upload Wait?

pnpm dlx shadcn@latest add @bollard/upload-wait

The files land in your project. They're yours to edit.

What input mistakes does Upload Wait catch?

  • Submitting before attachments have uploaded (queued instead)
  • Failed uploads, which pause the send until retried
  • Leaving the page mid-upload
  • Cancelling the queued send

What props does Upload Wait accept?

UploadWait props
PropTypeDefault
uploads* (required)

Every upload attached to this form, with its live status.

UploadItem[]—
onSubmit* (required)

Runs once every upload is done. Gets the form's data as it is at that moment. Return a promise for a pending state.

(data: FormData) => void | Promise<void>—
onRetry* (required)

Retries a failed upload.

(id: string) => void—
submitLabel

Label of the submit button.

string"Submit"
waitingLabel

`{count}` is "2 uploads".

string"Waiting for {count}…"
failedLabel

Label when an upload failed.

string"{count} failed"
submittingLabel

Label while onSubmit runs.

string"Sending…"
sentLabel

Label after sending.

string"Sent"
cancelLabel

Label of the cancel-queued-send button.

string"Don't send yet"
retryLabel

Label prefix of each retry button.

string"Retry"
idleHint

Hint while uploads run and nothing is queued. `{count}` and `{submit}` are filled in.

string"{count} still uploading. You can press {submit} now; it …
queuedHint

Hint while the send is queued.

string"Sends automatically when they finish."
failedHint

Hint when an upload failed.

string"Retry the failed upload to send."
listLabel

Accessible name of the upload list.

string"Uploads"
uploadedLabel

Accessible label of the done tick.

string"Uploaded"

* required. Also accepts the native props of <form> (className, aria-*, data-*…), passed through to it.

How is Upload Wait accessible?

  • Uploads list has an aria-label; retry buttons name the file
  • Status in a polite live region
  • Submit uses aria-busy while waiting or sending and aria-disabled once sent
  • Focus moves to Retry when an upload fails

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Validate on the server that every referenced upload exists and finished before accepting the form.

  • Upload state comes from your uploads prop
  • The server must still reject submissions that reference missing files

What expensive mistakes does Upload Wait stop?

Form submitted before upload finished

Also known as

upload progress · file upload · submit button · waiting for upload · s3 upload · document upload · kyc docs

Field type

What dependencies does Upload Wait require?

Upload Wait facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameUpload Wait
Registry identifier@bollard/upload-wait
Install commandnpx shadcn@latest add @bollard/upload-wait
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Upload Wait

What form validation mistake does Upload Wait catch?

Upload Wait prevents form submitted before upload finished. Lets people submit a form while attachments are still uploading: it queues the send, shows progress and submits when uploads finish. Catches: Submitting before attachments have uploaded (queued instead), Failed uploads, which pause the send until retried, Leaving the page mid-upload, Cancelling the queued send. Limitation: validate upload-wait schemas on backend.

How do I install upload-wait with shadcn?

Run `npx shadcn@latest add @bollard/upload-wait`. Sources added: registry/default/upload-wait/upload-wait.tsx. Package requirements: lucide-react.

What props customize Upload Wait?

Upload Wait accepts `uploads`, `onSubmit`, `onRetry`, `submitLabel`, `waitingLabel`. Configures upload progress, file upload, submit button behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of upload-wait?

Upload state comes from your uploads prop. The server must still reject submissions that reference missing files Server requirement: Validate on the server that every referenced upload exists and finished before accepting the form.

How does Upload Wait meet accessibility guidelines?

Uploads list has an aria-label; retry buttons name the file. Status in a polite live region. Submit uses aria-busy while waiting or sending and aria-disabled once sent. Focus moves to Retry when an upload fails. Minimizes errors: submitted before upload done, attachment missing after submit.

Which components pair with Upload Wait?