Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

File Upload

Drag-and-drop file picker that lists the chosen files.

ComponentsFile Upload
inputinteractive
<arc-file-upload>

Overview

FileUpload is a dashed dropzone for choosing files. People drop files on it, or click it (or press Enter or Space on it) to open the native file picker. Chosen files appear in a list below with their name, size in B, KB, MB or GB, and a remove button. It only selects files: uploading them, and showing progress, is up to you. `accept` is passed to the native picker, which filters what can be chosen there. Dropped files aren't checked against it, so check the type yourself before uploading. `max-size` is in bytes. Larger files are left out, with an error under the dropzone naming them, and `0` (the default) means no limit. The dropzone shows both limits as hints. With `multiple`, each drop or browse adds to the list. Without it, a new file replaces the old one, and only the first of several dropped files is kept. `arc-change` fires with the whole file array whenever the list changes, and removing a file also fires `arc-remove` with that file and its `index`. It isn't a form control, so the files don't submit with a form. Read them from `arc-change`.

Guidelines

Do

  • Set `accept` to say which file types you want, such as `accept="image/*"`
  • Set `max-size` so oversized files are stopped before they reach your server
  • Set `multiple` when people need to add several files, as for a photo gallery
  • Give it enough width for the hint text and the file names

Don't

  • Don't rely on `accept` to block other file types. It only filters the native picker
  • Don't set `max-size` to 0 and expect a limit. 0 means no limit

Features

  • The border turns the accent color and the background tints while files are dragged over it
  • `disabled` lowers the opacity and blocks clicks, drops and the keyboard

Preview

Usage

This component needs JavaScript. Use the Web Component or a framework wrapper.

<arc-file-upload id="uploader" accept="image/*" multiple></arc-file-upload>

<script>
  const uploader = document.getElementById('uploader');

  uploader.addEventListener('arc-change', (e) => {
    const files = e.detail.value;
    files.forEach(file => {
      console.log(file.name, file.size, file.type);
    });

    // Example: upload via FormData
    const form = new FormData();
    files.forEach(f => form.append('files', f));
    fetch('/api/upload', { method: 'POST', body: form });
  });

  uploader.addEventListener('arc-remove', (e) => {
    console.log('Removed:', e.detail.value.name);
  });
</script>

API

acceptstring''
Comma-separated list of accepted file types, passed directly to the native file input accept attribute. Examples: "image/*", ".pdf,.docx", "audio/mp3".
multiplebooleanfalse
When true, allows selecting multiple files. Each drop or browse interaction appends to the existing file list rather than replacing it.
maxSizenumber0
Maximum file size in bytes. Files exceeding this limit are rejected with an inline error message. Set to 0 for no limit.
disabledbooleanfalse
Disables the dropzone, preventing drag-and-drop and click interactions. Reduces opacity to 0.4.

Events

arc-change
Fired when files are added or dropped
arc-remove
Fired when a file is removed from the list

See also