MiHCM
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.

PropTypeDefaultDescriptionSince
acceptAccept—react-dropzone accept map for allowed MIME types or extensions.0.12.0
maxFiles / maxSize / minSizenumber—File count and size limits passed to react-dropzone.0.12.0
multiplebooleantrueAllow multiple files.0.12.0
disabledboolean—Disable drag and browse interactions.0.12.0
validatorDropzoneOptions["validator"]—Custom file validator.0.12.0
heading / description / browseLabelReactNode—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
classNamestring—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';