ui
ui copied to clipboard
feat: add file-input component
While using the template I ran over the need of a file upload input, so I thought in contribute to the project with it. I'm not sure about the whole process to contribute, could not find any documentation on this, but I managed what I think is the basic based on active pull requests of the project.
Here's how the file input looks like:

It could be improved to receive button variant as prop (although I don't see the need) or maybe improve the way I apply the file: modifier.
Anything that is missing or you think could be done better, please, let me know.
@LucasHang is attempting to deploy a commit to the shadcn-pro Team on Vercel.
A member of the Team first needs to authorize it.
Been looking into this as well. Let's see the preview.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| next-template | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 17, 2023 6:04pm |
| ui | ❌ Failed (Inspect) | Apr 17, 2023 6:04pm |
Should I do something about the Lint error? I can't see whats wrong and I'm not able to install the project dependencies and test it (it complains about next.js version conflict).
@LucasHang I pushed a file input example with the latest update. What do you think?
https://ui.shadcn.com/docs/components/input#file
@LucasHang I pushed a file input example with the latest update. What do you think?
https://ui.shadcn.com/docs/components/input#file
@shadcn Thats good, and way simpler. Already using instead of my approach, thanks.