UploadKit
SDK@uploadkitdev/react

UploadProgressBar

A horizontal progress bar with shimmer sweep, indeterminate state, and a bounce check on completion.

A straightforward horizontal progress variant: a "Select file" CTA on top, a pill-shaped track below, a shimmer sweep while uploading, an indeterminate sliding animation for the preparing phase, and a bounce-check reveal on success. Pair it with any layout.

Design inspiration: Vercel build logs, Linear CI bars.

motion is not required — the shimmer, indeterminate slide, and bounce-check are all pure CSS keyframes. Works identically whether motion is installed or not.

0%

Vercel · Linear — build log progress

Basic usage

import { UploadProgressBar } from '@uploadkitdev/react';

export default function Page() {
  return (
    <UploadProgressBar
      route="documentUploader"
      accept={['application/pdf']}
      maxSize={10 * 1024 * 1024}
      buttonLabel="Pick a PDF"
      onUploadComplete={(result) => {
        console.log('Uploaded:', result.url);
      }}
    />
  );
}

Props

PropTypeDefaultDescription
routestringRequired. Route name from your file router.
acceptstring[]Accepted MIME types.
maxSizenumberMaximum file size in bytes.
metadataRecord<string, unknown>JSON-serializable metadata forwarded to the server.
indeterminatebooleanfalseForce the indeterminate sliding animation (useful for pre-upload preparation phases).
showPercentbooleantrueShow the percent label below the bar.
buttonLabelstring'Select file'CTA button label.
onUploadComplete(result: UploadResult) => voidCalled after a successful upload.
onUploadError(error: Error) => voidCalled on upload failure.
classNamestringAdditional CSS class(es) merged onto the outer wrapper.

Theming

VariablePurpose
--uk-progress-trackTrack background
--uk-progress-fillBar fill color
--uk-progress-shimmerShimmer sweep gradient
--uk-successFill color on success
--uk-primary, --uk-primary-hoverCTA button colors

Accessibility

  • Track is role="progressbar" with aria-valuemin, aria-valuemax, and aria-valuenow
  • In indeterminate mode, aria-valuenow is omitted (per ARIA spec)
  • CTA button is a real <button> with aria-label
  • Respects prefers-reduced-motion — all animations collapse to 0.01ms

On this page