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
acceptAcceptreact-dropzone accept map for allowed MIME types or extensions.0.12.0
maxFiles / maxSize / minSizenumberFile count and size limits passed to react-dropzone.0.12.0
multiplebooleantrueAllow multiple files.0.12.0
disabledbooleanDisable drag and browse interactions.0.12.0
validatorDropzoneOptions["validator"]Custom file validator.0.12.0
heading / description / browseLabelReactNodeDefault content labels.0.12.0
children(state) => ReactNodeRender function for custom dropzone content and state display.0.12.0
onFilesAccepted / onFilesRejected(files | rejections) => voidCallbacks for accepted files and rejected files.0.12.0
classNamestringAdditional 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 documentationMiHCM forwards accept, size limits, multiple, disabled, validator, accepted files, and rejected files.
  • react-dropzone GitHubUse the upstream reference for full DropzoneOptions behavior and browser file-input constraints.

Import

import { Dropzone } from '@mihcm/ui/Dropzone';