Avara UI

UX Engineered Upload Flow

A highly-orchestrated, premium file upload component suite based on modern UX engineering principles. It goes far beyond a native <input type="file"> by addressing five distinct user feedback signals.
  1. Drag Feedback: The dropzone reacts physically (glow, border shift, icon scale) to drag events.
  2. Honest Progress: Replaces mystery spinners with exact percentage tracking, dynamic time estimations, and file metadata.
  3. Inline Retry: Files that fail mid-upload do not reset. They halt their state, turn red, and offer an inline 1-click retry button to resume.
  4. Upload Preview: Extracts visual proof (thumbnails) of the file instantly on the client side before upload completes.
  5. Independent Queue: Every file gets its own lane and state. One failure never blocks the others.
The suite is two pieces you compose yourself: a Dropzone that hands you File[], and an UploadItem that renders one entry of your own queue state. Drop real files into the first preview — its simulator randomly fails some at 89% so you can watch the inline retry resume.
Three upload surfaces live on this page, and each installs separately: the Dropzone + UploadItem suite, the Input block's built-in file mode for simple forms, and the Folder block as a playful drop target. Each section below ends with its own install.

Dropzone and upload queue

The full suite: a Dropzone that hands you File[], and an UploadItem for each row of your own queue state.

Dropzone

Useaccept
with a native input accept string such as "image/*,application/pdf" to restrict types.
maxSize{50}
is the limit in megabytes, and is echoed in the helper text automatically.

Upload states

status
drives the whole row — idle, uploading, paused, error and success each pick their own colours, icon and messaging.
onRetry
is what the inline Retry button calls after an error; onRemove backs the X.

Install the upload suite

New project? Follow the installation guide to set up Tailwind CSS, shadcn, the cn helper and lucide-react, register the @algorize-ui registry once, then copy your styles from the Themes page.

Install Upload

npx shadcn@latest add @algorize-ui/upload

components/custom/blocks/UploadBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Nothing beyond the shared setup — Upload needs only the cn helper and lucide-react, which the installation guide already put in place.

The dropzone example animates its queue with a few lines of CSS in the example itself — no extra package. It is optional; UploadItem renders fine without it.

Simple file input

For a form that just needs files attached, the Input block has a file mode with previews and removal built in. It has no dependency on the upload suite.

Simple file input

For a form that just needs files attached: the Input block in file mode, with previews and removal built in.

Settype"file"
on InputBlock to turn the field into a drag-and-drop zone with previews.
onFilesChange
returns native File[] on drop, selection and removal.
multiple
and accept pass through; accept takes the standard HTML string such as "image/*".

Install the input block

New project? Follow the installation guide to set up Tailwind CSS, shadcn, the cn helper and lucide-react, register the @algorize-ui registry once, then copy your styles from the Themes page.

Install Input

npx shadcn@latest add @algorize-ui/input

components/custom/blocks/InputBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Nothing beyond the shared setup — Input needs only the cn helper and lucide-react, which the installation guide already put in place.

Folder drop target

The Folder block as an upload surface — a playful alternative to a dropzone for a handful of files.

Folder drop target

The Folder block as an upload surface, tinted with the theme colour: drop files on it or click to browse. It starts empty, each dropped file becomes a card with its own progress bar, the pocket tracks the overall figure, and an × removes a file.

Setinteractive
to enable drag-and-drop and click-to-browse. onFiles receives the dropped or picked File[]; accept and multiple pass through to the input.
peek{0}
keeps the folder empty until the first drop — without it the folder shows three placeholder cards peeking out.
progress
drives the bar across the pocket (0–100); a per-file progress draws a bar on that card. onRemoveFile adds an × to each fanned card.
color
defaults to a soft tint of --primary (lightness 0.88, chroma at 40%), so the folder — body, pocket, icon and the peeking cards — follows your theme preset and the colour picker above without going heavy. Pass any CSS colour to pin one.

Install the folder block

New project? Follow the installation guide to set up Tailwind CSS, shadcn, the cn helper and lucide-react, register the @algorize-ui registry once, then copy your styles from the Themes page.

Two builds, same props and file — install one.

Install Folder

npx shadcn@latest add @algorize-ui/folder

components/custom/blocks/FolderBlock.tsx is written into your project. Copy any snippet from a Usage tab above and it runs.

Install dependencies

Step 1 installs these for you. Run them yourself only if you are adding Folder to an existing project by hand. The cn helper and lucide-react are not listed — the installation guide covers them once for every component.

tooltip is a component, not a package — the shadcn CLI installs it as source files.

npx shadcn@latest add @algorize-ui/tooltip

gsap is an npm package.

npm install gsap

Features

Discover the key capabilities that make this component an excellent choice for modern, animated user interfaces.

Fluid Animations

Hardware-accelerated transitions that ensure smooth 60fps performance across devices.

Highly Customizable

Exposes intuitive props for tailoring colors, sizes, and animation speeds to fit your brand.

Responsive Design

Automatically adapts to mobile, tablet, and desktop viewports without horizontal scrolling issues.

Accessible

Built with semantic HTML and ARIA labels where necessary to support screen readers and keyboard navigation.

Best Practices & Guidelines

Animation Performance

Avoid placing too many heavy animated components on a single screen to prevent layout thrashing and maintain 60fps performance. Use intersection observers to pause off-screen animations.

State Management

When triggering animations via state changes, ensure you wrap state updates in startTransition or use lightweight stores to prevent React rendering bottlenecks during the animation tick.

Props Reference

Component / InterfacePropTypeDefaultDescription
DropzoneonFilesDrop(files: File[]) => voidRequired
Callback function triggered when the user successfully drops files into the zone or selects them via the native file browser.
DropzonemaxSizenumber50
The maximum allowed file size in Megabytes (MB). Displayed dynamically in the helper text.
Dropzoneacceptstringundefined
Native HTML input accept string restricting file types (e.g., "image/*,application/pdf").
UploadItemitemFileUploadStateRequired
The data object tracking the specific file's progress, status, and metadata.
UploadItemonRetry(id: string) => voidundefined
Callback fired when the user clicks the inline "Retry" button after a file fails to upload.
UploadItemonRemove(id: string) => voidundefined
Callback fired when the user clicks the "X" button to cancel an upload or clear a completed file from the queue.
FileUploadStatestatus"idle" | "uploading" | "paused" | "error" | "success"Required
The core state machine parameter that drives the UI colors, icons, and messaging for the specific upload item.
InputBlocktype"file""text"
Switches the Input block into the drag-and-drop zone shown in the simple file input example.
InputBlockonFilesChange(files: File[]) => voidundefined
Fired when files are dropped, selected, or removed, with the current native File[].
InputBlock
multiple / accept
boolean / string
false / undefined
Allow several files, and restrict types with the standard HTML accept string (e.g. "image/*").
FileUploadStatepreviewUrlstringundefined
Optional local Blob URL used to render instant client-side image thumbnails before the upload completes.