Arc
ComponentsBlocksDocsPricingTry the demo
Introduction
Installation
Theming
Motion
AI and MCP
Changelog
Metrics dashboard
KPI drilldownNew
Metric explorer
Revenue explorer
MRR waterfall
Cohort retention
Usage forecast
Journey flow
Connected scatterNew
Market terminalNew
Budget varianceNew
Small multiplesNew
Line replayNew
AI chatNew
AI composer
Agent runNew
SidebarPro4
Page header
Command palette
Notification center
Empty states
Login and sign up5
OTP input
Multi-step formPro
Settings page
Security settings
Billing overview
Usage billingNew
Team members
Invite peopleNew
Team directory
Roles and permissions
API keys
Webhooks
Integrations
Plan comparison
Pricing calculatorNewPro
Usage pricingPro
Cart drawerNewPro
Checkout summaryNewPro
Invoice studio
Wallet card
Product listingNew
Product detailNew
Inbox triage
Support conversation
Support widget
File upload
Media playerPro
Week calendarNew
Availability picker
Project board
Release readiness
Hero sectionNew
Hero signupNewPro
Scroll storyNewPro
Spotlight gridNewPro
Feature bentoNewPro
Comparison tableNew
Logo marquee
Studio perspectivesPro
Stats bandNew
Changelog feed
FAQ sectionNew
Contact sectionNew
Team showcasePro
Blog gridNew
Site headerNew
Site footerNew
CTA sectionNew
Newsletter signupNew
Revenue globe
Customer galaxy
Semantic zoom
Layout morph
What’s new80 new
BlocksFile upload

File upload

A complete file selection flow with constraints, progress, and error feedback.

$pnpm dlx shadcn@latest add @uiarc/file-upload
Pattern · live

When to use

  • Uploading files with per-file progress, retry, and remove.
  • Attachments that must be validated by type and size before upload.
  • Uploads that should abort when a file is removed, via the AbortSignal.

When not to use

  • Use file-dropzone when you only need to pick files without upload state.
  • Use import-mapper when uploaded data needs column mapping.

Installation

Add File upload with the shadcn CLI, or copy the source by hand.

$pnpm dlx shadcn@latest add @uiarc/file-uploadpnpm dlx shadcn@latest add @uiarc/file-upload

Adds the block and its local dependencies, and installs motion, lucide-react. First time? Add the @uiarc registry to components.json, or use the full URL:

Usage

Use it for documents or media when people need to see upload progress and recover from invalid files.

example.tsx
1import { FileUpload } from "@/registry/components/file-upload/file-upload";2 3export function Attachments() {4  return (5    <FileUpload6      accept="image/*,.pdf"7      maxSize={10 * 1024 * 1024}8      onUpload={async (file, { onProgress, signal }) => {9        await uploadWithProgress(file, onProgress, signal);10      }}11    />12  );13}
Built fromFile pickerProgressFeedback

API reference

2 parts. The first is the root.

FileUpload

A dropzone with a file list that validates type and size, runs your upload per file with progress, and supports retry and remove.

PropTypeDefaultDescription
acceptstring–Comma-separated extensions or MIME types, including wildcards like image/*. Rejected files stay listed with an error.
maxSizenumber–Maximum size in bytes. Larger files are listed with an error.
multiplebooleantrueAllows several files. When false a new file replaces the old one.
disabledbooleanfalseDisables the dropzone and input.
labelstring"Upload files"Dropzone heading.
descriptionstring"Drop files here or browse from your device."Helper text, linked with aria-describedby.
valueFileUploadItem[]–Controlled file list.
onChange(files: FileUploadItem[]) => void–Called when files are added or removed.
onUpload(file: File, options: { onProgress: (percent: number) => void; signal: AbortSignal }) => Promise<void>–Uploads each valid file. Report 0-100 through onProgress, resolve when done, reject to mark it failed. Removing a file aborts its signal.

FileUploadItem

Item type: { id: string; file: File; error?: string }.

No props.

Keyboard interactions

EnterorSpace
Opens the file picker from the dropzone.
Tab
Moves through the dropzone and each row's retry and remove buttons.

Accessibility

  • The dropzone is role=button with aria-disabled and aria-describedby for the helper text.
  • An aria-live polite status line announces added, rejected, uploaded, failed, and removed files.
  • Retry and remove buttons are labelled with the file name.
  • After removing a file, focus moves to the neighbouring remove button or back to the dropzone.

Motion

  • The dropzone label swaps to Drop to add files while dragging; rows open and close their height on a spring.
  • One spring drives the progress bar and the counted percentage, the bar folds away once the file lands, and a check draws in.
  • Reduced motion jumps progress and replaces height and blur swaps with fades.

Responsive behavior

  • The dropzone and list fill their container; file names ellipsize on one line.
  • On touch devices the dropzone opens the native file picker, since drag and drop is desktop only.

Performance

  • Uploads run through your onUpload, one call per valid file; there is no concurrency limit, so queue large batches yourself.
  • The file list is not virtualized; keep it to a reasonable number of files.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Use when files are uploaded with progress. Use file-dropzone when you only need to pick files without upload state.
  • Wire onUpload to fetch or XHR and honour the AbortSignal; without onUpload files are only listed and validated.
/components/blocks/file-upload/markdown

The full library index for assistants is at /llms.txt.

Related

File dropzoneComponentA generous target for dropping one or more files.ProgressComponentShow how much of a known task is complete.
PreviousNotification centerNextOTP input
Arc · 75 block pagesllms.txt

On this page

  • Preview
  • When to use
  • When not to use
  • Installation
  • Usage
  • API reference
  • Keyboard
  • Accessibility
  • Motion
  • Responsive behavior
  • Performance
  • Notes for AI
  • Related
View as Markdown
Upload briefPDF or markdown, up to 10 MB.Browse