solidjs-dropzone
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Solid DropZone

SolidJS Adapter For React DropZone

Install

pnpm install solidjs-dropzone

Usage

import { useDropzone } from "solidjs-dropzone";

function MyDropzone() {
  const onDrop = (acceptedFiles: File[]) => {
    // Do something with the files
  };
  const { getInputProps, getRootProps, isDragActive } = useDropzone({ onDrop });
  return (
    <div {...getRootProps()}>
      <input {...getInputProps()} />
      {dropzone.isDragActive ? (
        <p>Drop the files here ...</p>
      ) : (
        <p>Drag 'n' drop some files here, or click to select files</p>
      )}
    </div>
  );
}

Readme

Keywords

Package Sidebar

Install

npm i solidjs-dropzone

Weekly Downloads

1,153

Version

1.0.0

License

ISC

Unpacked Size

151 kB

Total Files

12

Last publish

Collaborators

  • orjdev