Ready to use File Upload Dropzone component, built with shadcn/ui and react-dropzone.
npm install shadcn-dropzoneReady to use File Upload Dropzone component, built with shadcn/ui and react-dropzone.
Demo: https://diragb.github.io/shadcn-dropzone
``bash`
npm install --save shadcn-dropzone
or
`bash`
yarn add shadcn-dropzone
`tsx
import Dropzone from 'shadcn-dropzone';
// Use the default UI
const DefaultUI = () => {
return (
// Do something with the files
}}
/>
);
}
// Or, pass a custom UI
const CustomUI = () => {
return (
// Do something with the files
}}
>
{(dropzone: DropzoneState) => (
<>
{
dropzone.isDragAccept ? (
Make sure you have TailwindCSS set up in your project, as this component relies on them.
Check out react-dropzone for all the props.