UploadKit
SDK@uploadkitdev/react

UploadProgressLiquid

An Apple-style liquid fill container with dual sine-wave surfaces that rise as your file uploads.

A rounded vessel that fills with animated liquid as your file uploads. Two overlapping sine-wave SVG paths at different phases create an organic, lava-lamp-like surface. The water rises smoothly from 0% to 100%.

Design inspiration: Apple liquid animations, iOS battery charging.

The wave animation uses CSS @keyframes only — no Motion dependency required. The sine-wave paths translate horizontally to simulate fluid motion.

Click to upload

Apple — liquid fill vessel

Basic usage

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

export default function Page() {
  return (
    <UploadProgressLiquid
      route="videoUploader"
      accept={['video/*']}
      width={180}
      height={220}
      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.
widthnumber160Container width in pixels.
heightnumber200Container height in pixels.
onUploadComplete(result: UploadResult) => voidCalled after a successful upload.
onUploadError(error: Error) => voidCalled on upload failure.
classNamestringAdditional CSS class(es).

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

Theming

VariableDefaultPurpose
--uk-liquid-fillvar(--uk-primary)Liquid color (rendered at two opacity layers)
--uk-bgContainer background
--uk-borderContainer border
--uk-text, --uk-text-secondaryLabel and filename colors
--uk-successLiquid tint on completion
--uk-errorBorder tint on failure

Visual states

StateAppearance
idleUpload arrow icon + "Click to upload" caption
uploadingLiquid rises, waves oscillate, large percentage label
successLiquid fills to top, tints green briefly, checkmark icon
errorBorder turns red, X icon

Accessibility

  • Container is role="button" — click opens file picker
  • Keyboard accessible via Enter and Space
  • aria-busy and aria-label reflect current state
  • Wave SVGs are aria-hidden
  • Respects prefers-reduced-motion — wave animations pause

On this page