npm / @dnd-kit/dom
@dnd-kit/dom
What changed in @dnd-kit/dom 0.4 to 0.5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.
7 breaking13 new APIs and options1 performance3 behavior and defaults20 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@dnd-kit/dom 0.519 changes
New APIs and options 4
Adds a getter to the drag operation status indicating whether initialization is pending.
A helper exported from @dnd-kit/dom/sortable preserves explicit null transitions while merging partial transitions with defaults.
StyleInjector.register() accepts retain for rules that are inert outside a drag, allowing styles to remain injected between drag operations.
Accepts an object to disable dragging and dropping independently in useSortable, createSortable and Sortable, while preserving boolean behavior.
Performance 1
Auto-scrolling reuses each scroll container's position measurement to avoid duplicate layout reads.
Behavior and default changes 2
Keyboard shortcuts are matched against KeyboardEvent.key, so controls respect keyboard layouts and operating system key remaps; legacy Key_ and Digit_ configs still normalize.
Supports non-contiguous sortable indexes.
Fixes and other changes 12
The Accessibility plugin no longer sets aria-pressed on draggable activators whose role is not button.
Importing the modifiers subpath no longer requires ResizeObserver at import time in DOM-like test environments.
Pointer moves received while a drag operation initializes are recorded so the drag position catches up when the operation starts.
Narrowing with isSortable preserves custom data types instead of widening them to any.
Narrowing with isSortableOperation preserves custom data types, with source and target data types inferred independently.
Body-targeted clicks following pointer drops no longer unexpectedly dismiss popups, while iframe dragging is preserved.
Fixes stale initialIndex and initialGroup in onBeforeDragStart after an item moves.
React, Vue, Solid, and Svelte sortable bindings now respect transition: null instead of replacing it with the default transition.
Fixes flickering after drop.
Avoids a TypeError when getComputedStyle returns undefined for the individual scale CSS transform property on unsupported browsers.
Avoids a TypeError when getComputedStyle returns undefined for the individual translate CSS transform property on unsupported browsers.
Allows pointer dragging from descendants of interactive draggable elements, such as text inside sortable anchor elements.
@dnd-kit/dom 0.425 changes
Breaking changes 7
Animation resolution uses last-wins semantics matching CSS composite order, selecting the latest matching keyframe and latest value per CSS property.
Introduces event handler signatures, replacing DragDropEvents when typing event handlers.
The ambiguous type is split into DragDropEventMap and DragDropEventHandlers; its re-export from @dnd-kit/react and @dnd-kit/solid is removed.
The feedback property is moved from Draggable and Sortable hook input to per-entity Feedback plugin configuration.
StyleInjector accepts a nonce applied to all injected style elements; nonce options are removed from Cursor, PreventSelection, and Feedback.
Uses manual offset calculations for nested scroll containers; the centerIfNeeded boolean parameter is replaced by an options object with block and inline values.
Renames StyleSheetManager and centralizes injected-style nonce configuration in the StyleInjector plugin.
New APIs and options 9
Adds an option controlling the base scroll speed multiplier; its default is 25.
Adds a configurable scroll activation zone, accepting one number or per-axis values; setting an axis to 0 disables auto-scrolling on that axis.
Introduces the event-name-to-event-object type map, replacing DragDropEvents when typing event objects.
Draggable entities accept per-entity plugin configuration; listed plugins are registered on the manager if needed, and plugins can read entity options through source.pluginConfig.
Drop animation can now be configured per draggable through Feedback plugin configuration.
The context now includes the draggable entity as
source, enabling conditional animation logic.The Feedback plugin option now accepts a callback that chooses the feedback type using the source and manager context.
Adds control over the CSS transition for keyboard-driven moves, including duration and easing customization or disabling it with null.
Sortable plugins now accept a function receiving the default plugins, allowing additions without replacing defaults.
Behavior and default changes 1
The Feedback plugin supports the full CSS transform property; transform-related transitions are filtered, and shape calculation avoids re-measuring during transitions.
Fixes and other changes 8
Options are recalculated in the effect to avoid stale data.
Namespace-aware deep cloning preserves inline SVG children during mutation sync, preventing incorrect placeholder dimensions and misaligned drop animations.
Entity id changes are deferred and flushed atomically, preventing stale or duplicate registry entries from causing collision oscillation during virtualized sorting.
The placeholder stays adjacent to the source when a VDOM framework reorders sibling elements during a drag.
Type narrowing now identifies sortable draggables and exposes initialIndex.
The bind cleanup function now removes entries from the internal set, preventing detached DOM nodes from being retained in memory.
Cleanup aborts pending activation delay timers and handles setPointerCapture failures, fixing stale pointer activation errors on touch devices.
Cancels CSS transitions on transform-related properties before measuring to ensure correct FLIP deltas.