React Draggable
react-draggable
React draggable component
Component Libraries
react
draggable
react-component
react-draggable
Component Libraries
javascript
npm
frontend
open source
ui
Stars
9.3k
Weekly
4.3M
Open issues
62
Bundle
~25 kB
Installation
npm install react-draggableCode example
import { Button } from "react-draggable";
export function Example() {
return (
<div className="flex gap-2">
<Button>Primary</Button>
<Button variant="outline">Secondary</Button>
</div>
);
}Pros & cons
Pros
- Actively maintained by Matt Zabriskie
- 4.3M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 62 open issues on GitHub