primitives/@mihcm/ui·v0.21.0·stable
Dropzone
File drop and browse area powered by react-dropzone. Exposes accepted and rejected files without reading file contents.
Props
The full prop API for Dropzone. Same surface in web and React Native — bundlers pick the right variant via the react-native export condition.
| Prop | Type | Default | Description | Since |
|---|---|---|---|---|
accept | Accept | — | react-dropzone accept map for allowed MIME types or extensions. | 0.12.0 |
maxFiles / maxSize / minSize | number | — | File count and size limits passed to react-dropzone. | 0.12.0 |
multiple | boolean | true | Allow multiple files. | 0.12.0 |
disabled | boolean | — | Disable drag and browse interactions. | 0.12.0 |
validator | DropzoneOptions["validator"] | — | Custom file validator. | 0.12.0 |
heading / description / browseLabel | ReactNode | — | Default content labels. | 0.12.0 |
children | (state) => ReactNode | — | Render function for custom dropzone content and state display. | 0.12.0 |
onFilesAccepted / onFilesRejected | (files | rejections) => void | — | Callbacks for accepted files and rejected files. | 0.12.0 |
className | string | — | Additional Tailwind classes on the root drop area. | 0.12.0 |
Upstream library
This component intentionally keeps the MiHCM API small while preserving the supported upstream behavior listed below. Use these links when you need the full underlying option surface.
- react-dropzone documentation — MiHCM forwards accept, size limits, multiple, disabled, validator, accepted files, and rejected files.
- react-dropzone GitHub — Use the upstream reference for full DropzoneOptions behavior and browser file-input constraints.
Import
import { Dropzone } from '@mihcm/ui/Dropzone';