Upload Dialog

The classic "Upload files" modal: add files, review the list, then upload with one button.

"use client"

import { demoAdapter } from "@/examples/_demo"
import { UploadDialog } from "@/components/upload-dialog"

export default function UploadDialogExample() {
  return <UploadDialog adapter={demoAdapter} />
}

Installation

npx shadcn@latest add @uploadcn/upload-dialog

Usage

import { UploadDialog } from "@/components/upload-dialog"
<UploadDialog label="Upload files" onDone={(items) => refresh()} />

Files are added with autoUpload: false so nothing uploads until the user confirms. Closing the dialog mid-upload only hides it, uploads continue and the dialog shows their progress when reopened.

Props

Prop

Type

On this page