By providing `maxFiles` prop you can limit how many files the dropzone accepts. **Note** that this prop is enabled when the `multiple` prop is enabled. The default value for this prop is 0, which means there's no limitation to how many files are accepted. ```jsx harmony import React from 'react'; import {useDropzone} from 'react-dropzone'; function AcceptMaxFiles(props) { const { acceptedFiles, fileRejections, getRootProps, getInputProps } = useDropzone({ maxFiles:2 }); const acceptedFileItems = acceptedFiles.map(file => (
  • {file.path} - {file.size} bytes
  • )); const fileRejectionItems = fileRejections.map(({ file, errors }) => { return (
  • {file.path} - {file.size} bytes
  • ) }); return (

    Drag 'n' drop some files here, or click to select files

    (2 files are the maximum number of files you can drop here)
    ); } ```