How to create custom upload component to use with UploadThing?

UploadThing custom component is designed to be an entire section of a form. However, I'm working in a project, that involves multiple images inputs (field array), so I need a different design, something like a regular input size type of a button. Is there a way to achieve this? If there isn't, should I consider using the existing UploadThing component hidden (absolute and opacity-0) as an intermediary between my displayed component I've created, and the server? Or am I tripping?
3 Replies
p o h a
p o h a•15mo ago
did you try using the appearance and content property in the UploadDropzone/UploadButton components, there are options to customize the entire button from that property
vitor markis 🎈
vitor markis 🎈OP•15mo ago
Such a shame they don't have a composition pattern component like radix/shadcn, bad DX I gonna try to customize their component as close as my UI possible, thx
baxtrdool
baxtrdool•15mo ago
another option would be to use the useUploadThing hook rather than the UploadButton or UploadDropzone component. So that you can fully customise your button.
https://docs.uploadthing.com/api-reference/react#useuploadthing
React – uploadthing
Docs for the best file uploader to date
Want results from more Discord servers?
Add your server