Sensors are an abstraction to detect different input methods in order to initiate drag operations, respond to movement and end or cancel the operation.
DndContext
uses the Pointer and Keyboard sensors.
If you’d like to use other sensors, such as the Mouse and Touch sensors instead, initialize those sensors separately with the options you’d like to use using the useSensor
hook
useSensor
, make sure you pass the sensors to useSensors
before passing them to DndContext
: