Skip to content

iamchathu/react-material-file-upload

Repository files navigation

React Material File Upload

React Dropzone based Material UI file upload component for React.js. This is created for Material UI v5 or later versions. Written in Typescript. Library exports commonjs and esm modules.

npm Known Vulnerabilities Code Climate Codacy Badge GitHub license Twitter

Install

yarn add react-material-file-upload
  • Peer dependencies.

Library is depends on @mui/material, @mui/icons-material, @emotion/react, @emotion/styled. These are Material UI dependencies. Please refer the Material UI guide on configuring it.

Example

import { useState } from 'react';
import FileUpload from 'react-material-file-upload';

const App = () => {
  const [files, setFiles] = useState<File[]>([]);
  return <FileUpload value={files} onChange={setFiles} />;
};

Edit react-material-file-upload