New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

drag-react

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drag-react

React draggable component

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
189
decreased by-20.92%
Maintainers
1
Weekly downloads
 
Created
Source

React Draggable Component

A simple and lightweight component for making elements draggable.

Demo

stackblitz

Installation

$ npm install drag-react
# yarn add drag-react

Example

import { Draggable } from 'drag-react';

<Draggable>
  <div>My element is draggable now</div>
</Draggable>

Props

nametypedefaultdescription
childrenany-Some element
className?string'drag-react'Class name for drag wrapper
style?Object{ position: 'fixed', left: '10px', top: '10px', zIndex: 99999 , cursor: 'move' }css style for drag wrapper
onDragStart?(_: DOMRect) => void-Called whenever the user mouses down
onDragEnd?(_: DOMRect) => void-Called when dragging stops

License

MIT

Keywords

FAQs

Package last updated on 17 Sep 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc