dropimg
v1.0.4
Published
A react component to drag and drop image in react and nextjs
Downloads
2
Maintainers
Readme
dropimg (Sorry Please don't Install it's now in a test mode)
A package for easy image dropping functionality.
Installation
Install the dropimg
package using npm:
npm install dropimg
import { ImgDrop } from 'dropimg';
import React, { useState } from 'react';
import { ImgDrop } from 'dropimg';
const Component = () => {
const [imageFile, setImageFile] = useState(null);
const handleImageSelect = (file) => {
setImageFile(file);
};
return (
<ImgDrop onImageSelect={handleImageSelect}/>
);
}
export default Component;