UploadThing Dropzone Customization
Im tryng to customize UI of the Dropzone by changing the TailwindCSS classes in the node_modules, but nothing happens.. Does someone have a solution?
20 Replies
Are you editing the file in the node_modules folder or are you importing from there and passing a customization parameter that isn't working?
By the way looking at the (slightly broken) docs here: https://uploadstuff.dev/api-reference/UploadDropzone#props. It looks like you can just pass the
className
property into the component to customize the look.
If you find yourself modifying something in node_modules
though, then I recommend just copy-pasting that code out right into your code base. Modifying node_modules
will result in potentially very confusing outcomes and builds.UploadDropzone – Nextra
Nextra: the next docs builder
There is no such a customization parameter except className that basically isnt className and looks like this:
className?: (state: UploadDropzoneState) => string;
type UploadDropzoneState = {
progress: number | null;
isDragActive: boolean;
}
I want to change the border radius, text, colors.. so it matches my UI
@Michal Srb I think that type infromation in the doc might be a bug. It doesn't quite make sense on the surface unless I missed something.
I mean the most weird thing is that by changing the tailwind classes in node_modules, nothing happens.. I mean its ok to change UI in node_modules not the functionality
I had experience with those types of stuff and never had any issue
Yea I think I misread.


cant get it haha, sorry for spamming with questions last few days, but wanna make it my only platform for developing my apps, cuz i like the easyness
Of course no problem! It's helpful when people ask questions (even ones we don't have easy answers too) because it helps us make the platform better for everyone.
I am at a loss. There are other JS ecosystem experts floating around here that would have a better answer. But if I was in your place, I'd probably just copy that whole "UploadDropzone.tsx" out into my code base to reduce weird bundling variable.s
I hate big components haha
Just kidding, gonna do that immediately
Love making it out of micro components 😆
it works!
className={()=> twMerge(…)}
My guess is the argument is a function to provide a class name based on the upload state. If you always want the same class name you can just pass a function that returns the same string alwaysYea I peeked at the code that's what it seems to be doing: https://github.com/xixixao/uploadstuff/blob/main/lib/UploadDropzone.tsx#L104
GitHub
uploadstuff/lib/UploadDropzone.tsx at main · xixixao/uploadstuff
Contribute to xixixao/uploadstuff development by creating an account on GitHub.
Hey, how can i get the user id for the uploadthing middleware
Worth calling out that https://uploadstuff.dev/ is a project that is different from https://uploadthing.com/ - the former uses convex, the latter is a cool project but I'd talk to Theo & team for help with support on it
Hi there Ian. hope you're well.
is uploading thing supported now? thinking of using it, instead of going the AWS route
why don't you use storage from convex?
The cloudflare r2 component has a better value proposition for me so i skipped over upload thing for now. I wanted a example of how to do it to just copy so i didn't have to worry something was wrong with my design choices.
The convex team had submitted a pr into upload thing for something but it got rejected.
There are several people on theo's discord and convex that have implemented it.
They are probably using it for t3 chat.
I asked for examples. Nobody seems to care.
this is the gold standard for convex now https://github.com/mikecann/ourfiles
GitHub
GitHub - mikecann/ourfiles: a simple way to share files on a privat...
a simple way to share files on a private network. Contribute to mikecann/ourfiles development by creating an account on GitHub.
theres a youtube video on that too
I'm self-hosting. So what I want to do is get Convex to use UploadThing for blob storage instead of AWS.
Thanks man. I'll definately check this out