UploadKit
SDK@uploadkitdev/react

UploadProgressWave

A Spotify/SoundCloud-inspired audio waveform that fills left-to-right as your file uploads.

A row of vertical bars shaped like an audio waveform. Bars fill from left to right as progress increases — unfilled bars pulse gently while waiting. On success, all bars bounce in a staggered celebration.

Design inspiration: Spotify now-playing visualizer, SoundCloud waveform.

motion is an optional peerDependency. Without it, bars transition color via CSS. pnpm add motion for spring-based scaleY bounces and idle pulses.

Spotify · SoundCloud — waveform fill

Basic usage

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

export default function Page() {
  return (
    <UploadProgressWave
      route="audioUploader"
      accept={['audio/*']}
      bars={32}
      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.
barsnumber24Number of waveform bars. More bars = denser waveform.
onUploadComplete(result: UploadResult) => voidCalled after a successful upload.
onUploadError(error: Error) => voidCalled on upload failure.
classNamestringAdditional CSS class(es).

UploadProgressWave accepts a ref forwarded to the outer <div>.

Theming

VariableDefaultPurpose
--uk-wave-fillvar(--uk-primary)Filled bar color
--uk-wave-trackrgba(255,255,255,0.08)Unfilled bar color
--uk-text-secondaryFilename label below the waveform

Visual states

StateAppearance
idleAll bars at track color, gentle ambient pulse
uploadingBars fill left-to-right, unfilled bars pulse faster
successAll bars filled, staggered bounce celebration
errorBars reset to track color

Accessibility

  • Container is role="button" — click opens file picker, keyboard accessible
  • Inner bars carry role="progressbar" with aria-valuenow
  • Screen reader live region announces state changes
  • Respects prefers-reduced-motion

On this page