-
#1915
9b24dffThanks @clauderic! - Redesign event type system to follow the DOM EventMap pattern. IntroducesDragDropEventMapfor event object types andDragDropEventHandlersfor event handler signatures, replacing the ambiguously namedDragDropEvents. Event type aliases (CollisionEvent,DragStartEvent, etc.) now derive directly fromDragDropEventMaprather than usingParameters<>extraction.DragDropEventshas been split into two types:DragDropEventMap— maps event names to event object types (likeWindowEventMap)DragDropEventHandlers— maps event names to(event, manager) => voidhandler signatures
- If you were importing
DragDropEventsto type event objects, useDragDropEventMapinstead:// Before type MyEvent = Parameters<DragDropEvents<D, P, M>['dragend']>[0]; // After type MyEvent = DragDropEventMap<D, P, M>['dragend'];
- If you were importing
DragDropEventsto type event handlers, useDragDropEventHandlersinstead:// Before const handler: DragDropEvents<D, P, M>['dragend'] = (event, manager) => {}; // After const handler: DragDropEventHandlers<D, P, M>['dragend'] = ( event, manager ) => {};
- The
DragDropEventsre-export from@dnd-kit/reactand@dnd-kit/solidhas been removed. ImportDragDropEventMaporDragDropEventHandlersfrom@dnd-kit/abstractdirectly if needed. - Convenience aliases (
CollisionEvent,DragStartEvent,DragEndEvent, etc.) are unchanged and continue to work as before.
-
#1938
e69387dThanks @clauderic! - Added per-entity plugin configuration and movedfeedbackfrom the Draggable entity to the Feedback plugin.Draggable entities now accept a
pluginsproperty for per-entity plugin configuration, using the existingPlugin.configure()pattern. Plugins can read per-entity options viasource.pluginConfig(PluginClass).The
feedbackproperty ('default' | 'move' | 'clone' | 'none') has been moved from the Draggable entity toFeedbackOptions. Drop animation can also now be configured per-draggable.Plugins listed in an entity's
pluginsarray are auto-registered on the manager if not already present. The Sortable class now uses this generic mechanism instead of its own custom registration logic.The
feedbackproperty has been moved from the draggable/sortable hook input to per-entity Feedback plugin configuration.Before:
import {FeedbackType} from '@dnd-kit/dom'; useDraggable({id: 'item', feedback: 'clone'}); useSortable({id: 'item', index: 0, feedback: 'clone'});
After:
import {Feedback} from '@dnd-kit/dom'; useDraggable({ id: 'item', plugins: [Feedback.configure({feedback: 'clone'})], }); useSortable({ id: 'item', index: 0, plugins: (defaults) => [ ...defaults, Feedback.configure({feedback: 'clone'}), ], });
Drop animation can now be configured per-draggable:
useDraggable({ id: 'item', plugins: [Feedback.configure({feedback: 'clone', dropAnimation: null})], });
-
#1987
462e435Thanks @clauderic! - fix: resolve DTS build errors with TypeScript 5.9 on Node 20Add explicit return type annotations to avoid
[dispose]serialization failures during declaration emit, and fixuseRefreadonly errors for React 19 type compatibility. -
#1971
8fc1962Thanks @clauderic! - Added LICENSE file to all published packages. -
#1924
8e3e5eeThanks @clauderic! - FixuseDeepSignalcallingflushSyncfrom within a React lifecycle method.When signal updates are triggered synchronously from a React effect (e.g. during a
useEffectbatch), callingflushSyncdirectly violates React's internal invariant. The synchronous re-render is now deferred to a microtask viaqueueMicrotask, which runs after the current React batch completes but before the next paint. -
Updated dependencies [
4bc7e71,87bf1e6,521f760,c001272,cde61e4,78af13b,1328af8,532ae9b,267c97c,bfff7de,a5935e0,462e435,9b24dff,8fc1962,88d5ef9,8115a57,688e00f,cdaebff,e69387d,11ff2eb,7489265,4e35963,5a2ed80]:- @dnd-kit/dom@0.4.0
- @dnd-kit/abstract@0.4.0
- @dnd-kit/state@0.4.0
- Updated dependencies [
7260746]:- @dnd-kit/dom@0.3.2
- @dnd-kit/abstract@0.3.2
- @dnd-kit/state@0.3.2
- Updated dependencies [
4341114]:- @dnd-kit/abstract@0.3.1
- @dnd-kit/dom@0.3.1
- @dnd-kit/state@0.3.1
-
6a59647Thanks @clauderic! - Allowplugins,sensors, andmodifiersto accept a function that receives the defaults, making it easy to extend or configure them without replacing the entire array.// Add a plugin alongside the defaults const manager = new DragDropManager({ plugins: (defaults) => [...defaults, MyPlugin], });
// Configure a default plugin in React <DragDropProvider plugins={(defaults) => [ ...defaults, Feedback.configure({dropAnimation: null}), ]} />
Previously, passing
plugins,sensors, ormodifierswould replace the defaults entirely, requiring consumers to import and spreaddefaultPreset. The function form receives the default values as an argument, so consumers can add, remove, or configure individual entries without needing to know or maintain the full default list. -
68e44deThanks @clauderic! - AddisSortableOperationtype guard and exportSortableDraggable/SortableDroppabletypes.isSortableOperation(operation)narrows aDragOperationSnapshotso thatsourceis typed asSortableDraggableandtargetasSortableDroppable, providing typed access to sortable-specific properties likeindex,initialIndex,group, andinitialGroup.Re-exported from all framework packages (
@dnd-kit/react/sortable,@dnd-kit/vue/sortable,@dnd-kit/svelte/sortable,@dnd-kit/solid/sortable).
-
5d64078Thanks @clauderic! - AdddropAnimationprop to theDragOverlaycomponent to allow consumers to disable or customize the drop animation that plays when a drag operation ends. Set tonullto disable, pass{duration, easing}to customize timing, or provide a custom animation function for full control. -
Updated dependencies [
6a59647,5d64078,863ce2b,863ce2b,e8ae539,41d7e27,68e44de]:- @dnd-kit/abstract@0.3.0
- @dnd-kit/dom@0.3.0
- @dnd-kit/state@0.3.0
-
#1874
de27fbcThanks @clauderic! - Expose ergonomic type aliases for drag and drop event handlers:CollisionEvent,BeforeDragStartEvent,DragStartEvent,DragMoveEvent,DragOverEvent, andDragEndEvent. These types are re-exported from@dnd-kit/domand@dnd-kit/reactfor convenience. -
Updated dependencies [
de27fbc,c2097c9,be7cfe3,6d80680,0923bc6,5f1b19a]:- @dnd-kit/abstract@0.2.4
- @dnd-kit/dom@0.2.4
- @dnd-kit/state@0.2.4
- Updated dependencies [
f90571d]:- @dnd-kit/dom@0.2.3
- @dnd-kit/abstract@0.2.3
- @dnd-kit/state@0.2.3
- Updated dependencies [
5c80bcf]:- @dnd-kit/dom@0.2.2
- @dnd-kit/abstract@0.2.2
- @dnd-kit/state@0.2.2
- Updated dependencies [
d7f4130]:- @dnd-kit/dom@0.2.1
- @dnd-kit/abstract@0.2.1
- @dnd-kit/state@0.2.1
-
#1823
3058edeThanks @github-actions! - Simplified instance management ofmanagerto fix a bug where themanagerreturned byuseDragDropManagerwasnullon first mount. -
Updated dependencies [
e95a9c8,e95a9c8,9849887]:- @dnd-kit/abstract@0.2.0
- @dnd-kit/dom@0.2.0
- @dnd-kit/state@0.2.0
- Updated dependencies [
3d6219d]:- @dnd-kit/dom@0.1.21
- @dnd-kit/abstract@0.1.21
- @dnd-kit/state@0.1.21
- Updated dependencies [
3ba5a90,98d4cd4,32448ff]:- @dnd-kit/dom@0.1.20
- @dnd-kit/state@0.1.20
- @dnd-kit/abstract@0.1.20
- Updated dependencies [
cc7feac,d848327]:- @dnd-kit/dom@0.1.19
- @dnd-kit/state@0.1.19
- @dnd-kit/abstract@0.1.19
-
#1715
e502979Thanks @github-actions! - Improved TypeScript generics for better type safety and flexibility- Enhanced
DragDropManagerto accept generic type parameters with proper constraints, allowing for more flexible type usage while maintaining type safety - Updated
DragDropProviderto support custom generic types for draggable and droppable entities - Modified React hooks (
useDragDropManager,useDragDropMonitor,useDragOperation) to properly infer and return the correct generic types - Changed from concrete
DraggableandDroppabletypes to generic parameters constrained byDatatype
- Enhanced
-
#1715
d6b5736Thanks @github-actions! - : Addeddisabledprop to temporarily disable<DragOverlay>without unmounting it. Thedisabledprop accepts either abooleanor function that receives thesourceas input and returns aboolean, which can be useful to disable the<DragOverlay>based on thetypeordataof thesource. -
#1714
6a27d87Thanks @clauderic! - Refactor renderer to better handle calls touseOptimisticto update state during transitions. -
Updated dependencies [
e502979,88942be,9326d43,7af261f,b9b182e,bb790c9]:- @dnd-kit/dom@0.1.18
- @dnd-kit/abstract@0.1.18
- @dnd-kit/state@0.1.18
- Updated dependencies [
cfb94d4]:- @dnd-kit/dom@0.1.17
- @dnd-kit/abstract@0.1.17
- @dnd-kit/state@0.1.17
- Updated dependencies [
93911cc,0f68bb6]:- @dnd-kit/dom@0.1.16
- @dnd-kit/abstract@0.1.16
- @dnd-kit/state@0.1.16
- Updated dependencies [
5539a5a]:- @dnd-kit/dom@0.1.15
- @dnd-kit/abstract@0.1.15
- @dnd-kit/state@0.1.15
- Updated dependencies [
4c1e05d,a97b10c,caa3273,cb47da3,f295344]:- @dnd-kit/dom@0.1.14
- @dnd-kit/abstract@0.1.14
- @dnd-kit/state@0.1.14
- Updated dependencies [
c46415a,382f4e2,432a0dd,a3496c1,4a22b39]:- @dnd-kit/dom@0.1.13
- @dnd-kit/abstract@0.1.13
- @dnd-kit/state@0.1.13
- Updated dependencies [
2e0e2e2,b86867b,a913f5e]:- @dnd-kit/dom@0.1.12
- @dnd-kit/abstract@0.1.12
- @dnd-kit/state@0.1.12
- Updated dependencies [
2370665]:- @dnd-kit/dom@0.1.11
- @dnd-kit/abstract@0.1.11
- @dnd-kit/state@0.1.11
- Updated dependencies [
a0f5c44]:- @dnd-kit/dom@0.1.10
- @dnd-kit/abstract@0.1.10
- @dnd-kit/state@0.1.10
- Updated dependencies [
ffdbf52]:- @dnd-kit/dom@0.1.9
- @dnd-kit/abstract@0.1.9
- @dnd-kit/state@0.1.9
- Updated dependencies [
14dc059,fcd9bb5,93d3c7c,3c625d6]:- @dnd-kit/dom@0.1.8
- @dnd-kit/abstract@0.1.8
- @dnd-kit/state@0.1.8
- Updated dependencies [
0618852]:- @dnd-kit/dom@0.1.7
- @dnd-kit/abstract@0.1.7
- @dnd-kit/state@0.1.7
-
#1670
a69c390Thanks @GuillaumeSalles! - Fix useDroppable effects when inputs are updated -
Updated dependencies [
7ceb799,299389b,4f49d1b,b18115f,ac13c92]:- @dnd-kit/abstract@0.1.6
- @dnd-kit/state@0.1.6
- @dnd-kit/dom@0.1.6
- Updated dependencies [
8fecc41,a9c17df,f31589a,616db17]:- @dnd-kit/dom@0.1.5
- @dnd-kit/abstract@0.1.5
- @dnd-kit/state@0.1.5
- Updated dependencies [
b1d798d]:- @dnd-kit/dom@0.1.4
- @dnd-kit/abstract@0.1.4
- @dnd-kit/state@0.1.4
- Updated dependencies [
6c9a9ea,8f91d91,79c6519,52c1ba3,6c9a9ea,1bef872,9a0edf6,18a7998,a9db4c7]:- @dnd-kit/dom@0.1.3
- @dnd-kit/state@0.1.3
- @dnd-kit/abstract@0.1.3
-
#1658
42bec2cThanks @github-actions! - Add 'use client' directive to DragDropProvider componentThis change ensures proper client-side rendering in Next.js applications by explicitly marking the DragDropProvider component as a client component.
-
#1658
ee55f58Thanks @github-actions! - Refactor the drag operation system to improve code organization and maintainability:- Split
dragOperation.tsinto multiple focused files:operation.ts- Core drag operation logicstatus.ts- Status managementactions.ts- Drag actions
- Update imports and exports to reflect new file structure
- Improve type definitions and exports
- Split
-
Updated dependencies [
ee55f58,4682570,f8d69b0,d04e9a2,ee55f58,374f81f]:- @dnd-kit/state@0.1.2
- @dnd-kit/abstract@0.1.2
- @dnd-kit/dom@0.1.2
- #1656
a4f5fc3Thanks @github-actions! - - UpdateDragDropEventHandlerstypes to be non nullable.- Export
DragDropEventsand allow them to be generic - Allow
DragDropProviderto be passedDataas a generic
- Export
- Updated dependencies [
569b6e3,a176848,f13cbc9]:- @dnd-kit/dom@0.1.1
- @dnd-kit/abstract@0.1.1
- @dnd-kit/state@0.1.1
- #1650
23d694bThanks @MateusJabour! - Exports sensors from@dnd-kit/domthrough@dnd-kit/react
-
#1644
6cb931fThanks @github-actions! - ExportDragDropEventHandlerstype -
Updated dependencies [
00a33c9,043c280,ee40aac,635d94f,0235cef,1ba8700,3080d2c]:- @dnd-kit/abstract@0.1.0
- @dnd-kit/dom@0.1.0
- @dnd-kit/state@0.1.0
-
#1606
76d2d65Thanks @github-actions! - Introduce theuseDragDropMonitorhook to the@dnd-kit/reactpackage. This hook allows you to monitor drag and drop events within aDragDropProvider. -
349f0c0Thanks @clauderic! - Fixed incorrect types for theuseDragDropMonitorhook. -
Updated dependencies [
2c53eb9,3155941,082836e]:- @dnd-kit/dom@0.0.10
- @dnd-kit/abstract@0.0.10
- @dnd-kit/state@0.0.10
-
#1600
d86bbc7Thanks @github-actions! - Addedalignmentconfiguration option to draggable instances to let consumers decide how to align the draggable during the drop animation and while keyboard sorting. Defaults to the center of the target shape. -
#1600
2b76c19Thanks @github-actions! - Addedstyleandtagprops to<DragOverlay>component. -
#1600
b8898bcThanks @github-actions! - Re-exportisSortablefrom@dnd-kit/react/sortableso React consumers don't have to import it from@dnd-kit/dom/sortable. -
#1600
c5f25c8Thanks @github-actions! - Force synchronous re-render whenisDragSourceproperty is updated fromtruetofalseto enable seamless transition into idle state after drop animation. Without this change, the drop animation can finish before React has had a chance to update the drag source styles back to its idle state, which can cause some flickering. -
Updated dependencies [
e36d954,bb4abcd,d86bbc7,f433fb2,7dc0103,cff3c3c,b7f1cf8,f87d633,860759b,54e416f,3e629cc,c51778d,86ed6c8,afedea9,ce31da7]:- @dnd-kit/abstract@0.0.9
- @dnd-kit/dom@0.0.9
- @dnd-kit/state@0.0.9
-
#1598
426339dThanks @github-actions! - Added the<DragOverlay>component to ease migration for consumers of@dnd-kit/coremigrating to@dnd-kit/react -
#1598
3ea0d31Thanks @github-actions! - Added optionalregisterargument to instances ofEntityto disable automatic registration of instances that have a manager supplied on initialization. -
#1598
e7fafecThanks @github-actions! - Prevent theFeedbackelement that has the popover attribute from being accidentally closed during the drag operation, which would take it out of the top layer. -
#1597
6978d81Thanks @clauderic! - IntroduceuseDeepSignalhook, which keeps track of which properties are read on an object and automatically re-renders the component when a read signal changes. -
Updated dependencies [
0de7456,c9716cf,3ea0d31,3cf4db1,74eedef,42e7256]:- @dnd-kit/dom@0.0.8
- @dnd-kit/abstract@0.0.8
- @dnd-kit/state@0.0.8
-
#1592
cef9b46Thanks @github-actions! - Fix global modifiers set onDragDropManager/<DragDropProvider>being destroyed after the first drag operation. -
#1592
7c175e1Thanks @github-actions! - Fix element refs not being synchronized properly. -
#1592
280b7e2Thanks @github-actions! - Fixed stale modifiers when usinguseSortable. -
Updated dependencies [
550a868,c1dadef,75e23b6,cef9b46,730064b,808f184,c4e7a7c,280b7e2,84b75fc]:- @dnd-kit/dom@0.0.7
- @dnd-kit/abstract@0.0.7
- @dnd-kit/state@0.0.7
-
#1567
081b7f2Thanks @chrisvxd! - Add source maps to output. -
#1554
7aeac23Thanks @chrisvxd! - fix: don't lockup in React strict mode when using DragDropManager with the default manager -
#1454
d26fafeThanks @github-actions! - Prevent un-necessary re-renders of unuseduseSignalvalues. -
#1454
d302511Thanks @github-actions! - Prevent unstablereffrom being set to undefined during a drag operation on draggable sources during a drag operation. -
#1591
548f011Thanks @chrisvxd! - Address typo in React 19 peer dependency. -
#1590
5e55b89Thanks @chrisvxd! - Add React 19 to list of supported peer dependencies. -
#1454
a5a556aThanks @github-actions! - Fixed React lifecycle regressions related to StrictMode. -
#1454
e2f5d93Thanks @github-actions! -useSortable: Make suregroupandindexare updated at the same time. -
#1454
ff17c04Thanks @github-actions! - Allow dependencies to be passed touseComputedhook. -
#1454
3312dcfThanks @github-actions! - Use layout effect to register instances in theuseInstancehook. This fixes issues with effects running after the browser has painted during drag operations, which can result in invalid shapes or flickering. -
Updated dependencies [
984b5ab,081b7f2,d436037,94920c8,a04d3f8,0676276,8053e4b,f400106,c597b3f,a8542de,a9798f4,f7458d9,b750c05,e70b29a,3d0b00a,e6a8e01,7ef9864,4d1a030,51be6df,fe76033,62a8118,a5933d8,0c7bf85,f219549,bfc8ab2,a5a556a,b5edff1,96f28ef,3fb972e,5b36f8f,69bfad7,c42a11b]:- @dnd-kit/abstract@0.0.6
- @dnd-kit/dom@0.0.6
- @dnd-kit/state@0.0.6
- Updated dependencies [
e9be505]:- @dnd-kit/abstract@0.0.5
- @dnd-kit/dom@0.0.5
- @dnd-kit/state@0.0.5
-
#1443
2ccc27cThanks @clauderic! - Addedstatusproperty to draggable instances to know the current status of a draggable instance. Useful to know if an instance is being dropped. -
#1443
e0d80f5Thanks @clauderic! - Refactor the lifecycle to allowmanagerto be optional and provided later during the lifecycle ofdraggable/droppable/sortableinstances. -
#1443
794cf2fThanks @clauderic! - Removedoptionsandoptions.registerfromEntitybase class. Passing anundefinedmanager when instantiatingDraggableandDroppablenow has the same effect. -
Updated dependencies [
2ccc27c,1b9df29,4dbcb1c,a4d9150,e0d80f5,794cf2f]:- @dnd-kit/abstract@0.0.4
- @dnd-kit/dom@0.0.4
- @dnd-kit/state@0.0.4
-
8530c12Thanks @clauderic! - Fixed lifecycle related issues. -
#1440
86e5191Thanks @clauderic! - Fixed a bug whereuseDraggable,useDroppableanduseSortablewould not un-register from the old manager and re-register themselves with the new manager when its reference changes. -
8530c12Thanks @clauderic! - Add lazy import forDragDropProvider. -
#1440
5ccd5e6Thanks @clauderic! - Update modifiers on theDraggableinstances whenuseDraggablereceives updated modifiers -
#1440
8f421eeThanks @clauderic! - Add"use client"hints to@dnd-kit/reactexports. -
Updated dependencies [
8530c12,8e45c2a,5ccd5e6,886de33]:- @dnd-kit/dom@0.0.3
- @dnd-kit/abstract@0.0.3
- @dnd-kit/state@0.0.3
-
#1430
6c84308Thanks @clauderic! - -useDraggable: Fixed a bug where theelementwas not properly being set on initialization -
#1430
2c3ad5eThanks @clauderic! - - Fix issues with<StrictMode>in React -
Updated dependencies [
6c84308,6c84308,d273f70,34c6fdc,2c3ad5e]:- @dnd-kit/dom@0.0.2
- @dnd-kit/state@0.0.2
- @dnd-kit/abstract@0.0.2