1.0.10 • Published 1 year ago

draggable-react-component v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Introduction

draggable-react-component is a simple React component and hook for making elements in your application draggable. This package provides an easy-to-use API for creating draggable elements in your React application.

Installation

To install the draggable-react-component package, run the following command in your project's terminal:

npm install draggable-react-component

Usage

The draggable-react-component package includes two exports: the Draggable component and the useDraggable hook.

The Draggable Component

The Draggable component is a simple wrapper around a div that makes its children draggable. It uses the useDraggable hook internally to manage the draggable state.

Here's an example of how to use the Draggable component in your application:

import React from "react";
import  Draggable  from "draggable-react-component";

const MyDraggableElement = () => {
return (
<Draggable>

<div>I am a draggable element!</div>
</Draggable>
);
};

Conclusion

The draggable-react-component package provides a simple and easy-to-use solution for making elements in your React application draggable. Whether you're looking to use the Draggable component or the useDraggable hook, this package provides everything you need to get started.

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago