BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/uploadthingui/dropzone-dialog

Dropzone Dialog

uploadthingui/dropzone-dialog
FreeComponent

An upload button component which opens up a dialog with a dropzone and uses toasts as its response method.

Live preview

live · rendered by the registry
Rendered by uploadthingui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://uploadthingui.webdevkaleem.com/r/dropzone-dialog.json

Source

registry/new-york/dropzone-dialog/dropzone-dialog.tsxuploadthingui.webdevkaleem.com/r/dropzone-dialog.json · first 6 KB
1"use client";
2
3import { Button } from "@/components/ui/button";
4import {
5 Dialog,
6 DialogContent,
7 DialogDescription,
8 DialogFooter,
9 DialogHeader,
10 DialogTitle,
11 DialogTrigger,
12} from "@/components/ui/dialog";
13import {
14 Drawer,
15 DrawerContent,
16 DrawerDescription,
17 DrawerFooter,
18 DrawerHeader,
19 DrawerTitle,
20 DrawerTrigger,
21} from "@/components/ui/drawer";
22import {
23 Tooltip,
24 TooltipContent,
25 TooltipTrigger,
26} from "@/components/ui/tooltip";
27import { useMediaQuery } from "@/hooks/use-media-query";
28import { UploadButton, useUploadThing } from "@/lib/uploadthing";
29import {
30 checkFileObjectKey,
31 getFileSizeFormatted,
32 truncateFileName,
33} from "@/lib/uploadthingui-utils";
34import { cn } from "@/lib/utils";
35import { useFileStorageStore, type UTUIFile } from "@/stores/main";
36import { createId } from "@paralleldrive/cuid2";
37import { useDropzone } from "@uploadthing/react";
38import {
39 generateClientDropzoneAccept,
40 generatePermittedFileTypes,
41} from "@uploadthing/shared";
42import { File, Upload, UploadCloud, X } from "lucide-react";
43import {
44 cloneElement,
45 isValidElement,
46 useCallback,
47 useEffect,
48 useRef,
49 useState,
50 type ComponentProps,
51} from "react";
52import { toast } from "sonner";
53
54// Get the props type directly from UploadButton
55type UploadButtonProps = ComponentProps<typeof UploadButton>;
56
57/**
58 * @description An upload button component which opens up a dialog with a dropzone and uses toasts as its response method.
59 * @param {UploadButtonProps} props - The props for the UploadButton component.
60 * @param {boolean} showDetails - Whether to show the details of the upload.
61 * @param {string} instanceId - The instance ID for the upload. Required to avoid multiple instances of the same component if multiple upload buttons are used.
62 * @param {boolean} allowInBetweenUploads - Whether to allow in between uploads.
63 * @param {routeDetails} routeDetails - Additional details for the upload; Example: maxFileCount, minFileCount, etc.
64 * @param {React.ReactNode} children - React node to render a custom button component.
65 */
66export default function DropzoneDialog({
67 props,
68 showDetails = true,
69 instanceId,
70 allowInBetweenUploads = true,
71 routeDetails,
72 children,
73}: {
74 props: UploadButtonProps;
75 showDetails?: boolean;
76 instanceId: string;
77 allowInBetweenUploads?: boolean;
78 routeDetails?: {
79 maxFileCount?: number;
80 minFileCount?: number;
81 };
82// … truncated

What it pulls in

npm packages

  • lucide-react@^0.435.0
  • @paralleldrive/cuid2@^2.2.2
  • uploadthing@^7.7.2
  • @uploadthing/react@^7.3.1
  • @uploadthing/shared@^7.1.8

Other registry items

  • sonner
  • button
  • dialog
  • drawer
  • tooltip

Files it writes

  • registry/new-york/dropzone-dialog/dropzone-dialog.tsx
  • hooks/use-media-query.tsx
  • stores/main.ts
  • lib/uploadthingui-utils.ts
  • lib/uploadthing.ts
  • lib/uploadthingui-types.ts

Facts

Registry
uploadthingui
Type
registry:component
Access
Free
Files written
6
Licence
the repository states none
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

Docs on uploadthingui uploadthingui.webdevkaleem.com webdevkaleem/uploadthingui on GitHub Raw registry item This item as JSON

More from uploadthingui

All 2 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Toast Buttontoast-buttonuploadthinguiComponentsFree5 deps · 5 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex