Arc
ComponentsBlocksDocsPricingTry the demo
Get Pro
Introduction
Installation
Theming
Motion
AI and MCP
Changelog
Metrics dashboardPro
KPI drilldownPro
Metric explorerPro
Revenue explorerPro
MRR waterfallPro
Cohort retentionPro
Usage forecastPro
Journey flowPro
Uptime statusPro
Pivot builderNewPro
Choropleth explorerPro
Connected scatterPro
Horizon chartPro
Account healthPro
Market terminalPro
Budget variancePro
Small multiplesPro
Line replayPro
AI chatPro
AI composerPro
AI answerPro
Model pickerPro
Model arenaPro
Prompt studioPro
Document extractionPro
Agent memoryPro
AI side panelPro
AI inline editPro
Research runPro
AI insight cardPro
Catch upPro
AI feature launchPro
AI search barPro
AI setup wizardPro
Call insightsPro
Lead scoringPro
Agent runPro
Agent tasksPro
Agent approvalsPro
Agent routinesPro
Agent orchestratorPro
MCP serversPro
Knowledge basePro
Eval suitePro
Agent builderPro
Agent galleryPro
SidebarPro4
Page header
Command palette
Notification center
Selection toolbarPro
Empty states
Search resultsPro
Login and sign up5, free and Pro variants
Onboarding illustrationPro
OTP input
Multi-step formPro
Two-factor setupPro
Magic linkPro
Settings pagePro
Settings commandPro
Security settingsPro
Billing overviewPro
Usage billingPro
Cancel flowPro
Onboarding surveyPro
Spend alertPro
Team membersPro
Invite peoplePro
Team directoryPro
Roles and permissionsPro
Profile pagePro
API keysPro
WebhooksPro
IntegrationsPro
Environment variablesPro
Domain verifyPro
Webhook testerPro
Plan comparison
Pricing calculatorPro
Usage pricingPro
Cart drawerPro
Checkout summaryPro
Live checkoutPro
Seat managerPro
Credit top-upPro
Invoice studioPro
Wallet cardPro
Delivery trackerPro
Product listingPro
Product detailPro
Seat mapPro
Activity feedPro
Inbox triagePro
Support conversationPro
Support widgetPro
Help centerPro
Feature votingPro
File upload
Media playerPro
Week calendarPro
Availability pickerPro
Project boardPro
Gantt timelineNewPro
Release readinessPro
Kanban boardPro
Feedback boardPro
Smart schedulerPro
Task breakdownPro
Goal trackerPro
Hero section
Hero signupPro
Scroll storyPro
Spotlight gridPro
Feature bentoPro
Comparison table
Logo marquee
Studio perspectivesPro
Stats band
Changelog feed
FAQ section
Contact section
Team showcasePro
Blog grid
Site header
Site footer
CTA section
Newsletter signup
Activity terrainPro
Revenue globePro
Customer galaxyPro
Semantic zoomPro
Layout morphPro
Exploded viewPro
What’s new4 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 "@/components/arc/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.

More like this in Pro

Explore Pro
Media playerProBlockAn audio player with a living playlist and complete playback controls.MCP serversProBlockManage the MCP servers that give an agent its tools: see what the enabled tools cost in context, connect or pause a server, and switch single tools on or off.Knowledge baseProBlockA retrieval knowledge base in one card: add sources and watch them parse, chunk, embed and index, then test a question and see which chunks come back and why.
PreviousSelection toolbarNextOTP input
Arc · 134 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