UploadKit
SDK@uploadkitdev/react

UploadButtonPulse

An Apple-style calm pulsing upload button with radial ring animation and squeeze-on-click feedback.

A pill-shaped button that breathes with a gentle radial pulse while idle, squeezes on click, and shows inline progress during upload. Calm, confident, Apple-like.

Design inspiration: Apple action buttons, iOS share sheet.

motion is an optional peerDependency. Without it, the pulse uses a CSS keyframe. pnpm add motion for spring-based whileTap squeeze and smoother ring animation.

Apple — calm radial pulse

Basic usage

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

export default function Page() {
  return (
    <UploadButtonPulse
      route="imageUploader"
      accept={['image/*']}
      maxSize={5 * 1024 * 1024}
      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.
onUploadComplete(result: UploadResult) => voidCalled after a successful upload.
onUploadError(error: Error) => voidCalled on upload failure.
disabledbooleanfalseDisables the button.
classNamestringAdditional CSS class(es).
childrenReactNode'Upload file'Button label.

UploadButtonPulse accepts a ref forwarded to the <button>.

Visual states

StateAppearance
idleSoft radial pulse ring expands and fades every 2.4s
uploadingPulse stops, label shows "Uploading N%"
successBackground transitions to green, label shows "Done"
errorLabel shows error briefly

Theming

VariablePurpose
--uk-primaryButton background and pulse ring color
--uk-successBackground on success

Accessibility

  • Native <button> element with aria-busy during upload
  • focus-visible outline
  • Respects prefers-reduced-motion — pulse animation drops to 0.01ms

On this page