useDraggable
Drag an element with mouse, touch or pen, with axis locking, bounds and grid snapping. Arrow keys move the focused element, so dragging also works from the keyboard.
- Level
- Advanced
- Since
- v2.1.0
import {useDraggable} from '@zenuilabs/react-hooks';Loading demo_
More in Interaction
InteractionIntermediateuseDropTurn an element into a drop target for files, text or links. Use it when you want to accept any kind of dragged content.InteractionIntermediateuseDropAreaTurn an element into a drop zone for files, with optional type filtering. Use it for upload areas.InteractionAdvanceduseFocusTrapKeep keyboard focus inside a container while it is active, and give focus back when it closes. Use it for modal dialogs, drawers and menus.