This component no longer exists. It was in diceui/base’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-13 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
file-upload-circular-progress-demo
diceui-base/file-upload-circular-progress-demoRemovedExample
diceui/base publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/sadmann7/diceui/HEAD/docs/public/r/styles/base-vega/file-upload-circular-progress-demo.jsonSource
1"use client";23import { Upload, X } from "lucide-react";4import * as React from "react";5import { toast } from "sonner";6import { Button } from "@/registry/bases/base/ui/button";7import {8 FileUpload,9 FileUploadDropzone,10 FileUploadItem,11 FileUploadItemDelete,12 FileUploadItemMetadata,13 FileUploadItemPreview,14 FileUploadItemProgress,15 FileUploadList,16 FileUploadTrigger,17} from "@/registry/bases/base/ui/file-upload";1819export default function FileUploadCircularProgressDemo() {20 const [files, setFiles] = React.useState<File[]>([]);2122 const onUpload = React.useCallback(23 async (24 files: File[],25 {26 onProgress,27 onSuccess,28 onError,29 }: {30 onProgress: (file: File, progress: number) => void;31 onSuccess: (file: File) => void;32 onError: (file: File, error: Error) => void;33 },34 ) => {35 try {36 // Process each file individually37 const uploadPromises = files.map(async (file) => {38 try {39 // Simulate file upload with progress40 const totalChunks = 10;41 let uploadedChunks = 0;4243 // Simulate chunk upload with delays44 for (let i = 0; i < totalChunks; i++) {45 // Simulate network delay (100-300ms per chunk)46 await new Promise((resolve) =>47 setTimeout(resolve, Math.random() * 200 + 100),48 );4950 // Update progress for this specific file51 uploadedChunks++;52 const progress = (uploadedChunks / totalChunks) * 100;53 onProgress(file, progress);54 }5556 // Simulate server processing delay57 await new Promise((resolve) => setTimeout(resolve, 500));58 onSuccess(file);59 } catch (error) {60 onError(61 file,62 error instanceof Error ? error : new Error("Upload failed"),63 );64 }65 });6667 // Wait for all uploads to complete68 await Promise.all(uploadPromises);69 } catch (error) {70 // This handles any error that might occur outside the individual upload processes71 console.error("Unexpected error during upload:", error);72 }73 },74 [],75 );7677 const onFileReject = React.useCallback((file: File, message: string) => {78 toast(message, {79 description: `"${file.name.length > 20 ? `${file.name.slice(0, 20)}...` : file.name}" has been rejected`,80 });81 }, []);8283 return (84// … truncated
What it pulls in
npm packages
Other registry items
