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
6.6M
Open issues
212
Bundle
~15 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
- 6.6M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~15 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 212 open issues on GitHub