🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

direct-drop-area

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

direct-drop-area

react based component converting the component to a drop zone for file upload or manipulations supporting direct web image drop

latest
Source
npmnpm
Version
1.0.13
Version published
Maintainers
1
Created
Source

direct-drop-area

react based component converting the element to a drop zone for file upload or manipulations supporting direct web image drop Supporting multiple drop as well

sample

Installation

npm i direct-drop-area
import { DirectDropArea } from 'direct-drop-area'
const acceptedFilesType = 'image/*'; // accepted file types
(<DirectDropArea
    dontRead
    accept={acceptedFilesType}
    onDrop={(file) => console.log(file)}
    handleClick={false}>
    {({over, overDocument}) => (
        <div
            style={{
                width: '600px',
                height: '200px',
                display: 'flex',
                alignItems: 'center',
                justifyContent: 'center',
                border: "5px solid black",
                ...(over
                    ? {opacity: '50%', border: '5px dashed #259925'}
                    : {}),
            }}
        >
            this is a drop zone 
        </div>)}
</DirectDropArea>)

For contributions

$ git clone https://github.com/sreenathch/direct-drop-area.git
$ cd direct-drop-area
$ yarn install

Scripts

Running locally

$ yarn start

Keywords

drop

FAQs

Package last updated on 08 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts