unstale

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

@unstale/cli 0.2.9 on npm

@dnd-kit/dom 0.519 changes

New APIs and options 4

  • Adds a getter to the drag operation status indicating whether initialization is pending.

    0.5.1release notes

  • A helper exported from @dnd-kit/dom/sortable preserves explicit null transitions while merging partial transitions with defaults.

    0.5.1release notes

  • StyleInjector.register() accepts retain for rules that are inert outside a drag, allowing styles to remain injected between drag operations.

    0.5.1release notes

  • Accepts an object to disable dragging and dropping independently in useSortable, createSortable and Sortable, while preserving boolean behavior.

    0.5.0release notes

Performance 1

  • Auto-scrolling reuses each scroll container's position measurement to avoid duplicate layout reads.

    0.5.1release notes

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.

    0.5.1release notes

  • Supports non-contiguous sortable indexes.

    0.5.0release notes

Fixes and other changes 12

  • The Accessibility plugin no longer sets aria-pressed on draggable activators whose role is not button.

    0.5.1release notes

  • Importing the modifiers subpath no longer requires ResizeObserver at import time in DOM-like test environments.

    0.5.1release notes

  • Pointer moves received while a drag operation initializes are recorded so the drag position catches up when the operation starts.

    0.5.1release notes

  • Narrowing with isSortable preserves custom data types instead of widening them to any.

    0.5.1release notes

  • Narrowing with isSortableOperation preserves custom data types, with source and target data types inferred independently.

    0.5.1release notes

  • Body-targeted clicks following pointer drops no longer unexpectedly dismiss popups, while iframe dragging is preserved.

    0.5.1release notes

  • Fixes stale initialIndex and initialGroup in onBeforeDragStart after an item moves.

    0.5.1release notes

  • React, Vue, Solid, and Svelte sortable bindings now respect transition: null instead of replacing it with the default transition.

    0.5.1release notes

  • Fixes flickering after drop.

    0.5.0release notes

  • Avoids a TypeError when getComputedStyle returns undefined for the individual scale CSS transform property on unsupported browsers.

    0.5.0release notes

  • Avoids a TypeError when getComputedStyle returns undefined for the individual translate CSS transform property on unsupported browsers.

    0.5.0release notes

  • Allows pointer dragging from descendants of interactive draggable elements, such as text inside sortable anchor elements.

    0.5.0release notes

@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.

    0.4.0release notes

  • Introduces event handler signatures, replacing DragDropEvents when typing event handlers.

    0.4.0release notes

  • The ambiguous type is split into DragDropEventMap and DragDropEventHandlers; its re-export from @dnd-kit/react and @dnd-kit/solid is removed.

    0.4.0release notes

  • The feedback property is moved from Draggable and Sortable hook input to per-entity Feedback plugin configuration.

    0.4.0release notes

  • StyleInjector accepts a nonce applied to all injected style elements; nonce options are removed from Cursor, PreventSelection, and Feedback.

    0.4.0release notes

  • Uses manual offset calculations for nested scroll containers; the centerIfNeeded boolean parameter is replaced by an options object with block and inline values.

    0.4.0release notes

  • Renames StyleSheetManager and centralizes injected-style nonce configuration in the StyleInjector plugin.

    0.4.0release notes

New APIs and options 9

  • Adds an option controlling the base scroll speed multiplier; its default is 25.

    0.4.0release notes

  • Adds a configurable scroll activation zone, accepting one number or per-axis values; setting an axis to 0 disables auto-scrolling on that axis.

    0.4.0release notes

  • Introduces the event-name-to-event-object type map, replacing DragDropEvents when typing event objects.

    0.4.0release notes

  • 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.

    0.4.0release notes

  • Drop animation can now be configured per draggable through Feedback plugin configuration.

    0.4.0release notes

  • The context now includes the draggable entity as source, enabling conditional animation logic.

    0.4.0release notes

  • The Feedback plugin option now accepts a callback that chooses the feedback type using the source and manager context.

    0.4.0release notes

  • Adds control over the CSS transition for keyboard-driven moves, including duration and easing customization or disabling it with null.

    0.4.0release notes

  • Sortable plugins now accept a function receiving the default plugins, allowing additions without replacing defaults.

    0.4.0release notes

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.

    0.4.0release notes

Fixes and other changes 8

  • Options are recalculated in the effect to avoid stale data.

    0.4.0release notes

  • Namespace-aware deep cloning preserves inline SVG children during mutation sync, preventing incorrect placeholder dimensions and misaligned drop animations.

    0.4.0release notes

  • Entity id changes are deferred and flushed atomically, preventing stale or duplicate registry entries from causing collision oscillation during virtualized sorting.

    0.4.0release notes

  • The placeholder stays adjacent to the source when a VDOM framework reorders sibling elements during a drag.

    0.4.0release notes

  • Type narrowing now identifies sortable draggables and exposes initialIndex.

    0.4.0release notes

  • The bind cleanup function now removes entries from the internal set, preventing detached DOM nodes from being retained in memory.

    0.4.0release notes

  • Cleanup aborts pending activation delay timers and handles setPointerCapture failures, fixing stale pointer activation errors on touch devices.

    0.4.0release notes

  • Cancels CSS transitions on transform-related properties before measuring to ensure correct FLIP deltas.

    0.4.0release notes