Skip to content
Search
Search the documentation
Custom dragged element
GitHub 0

Custom dragged element

Change how the element under the pointer looks with transformDraggedElement.

  • Pack the bag
  • Charge the phone
  • Check the weather
  • Lock the door

While a pointer drag is running, transformDraggedElement receives the element that follows the pointer, the item’s data and the index it would land at. Here it tilts the element, adds a shadow and an outline, and writes the target position into its label (a number sign and the position). It runs after the library has copied the placeholder’s styles onto the element, so what it sets wins, and it runs again on every update, so it must give the same result each time. The checkbox sets centreDraggedOnCursor. See the options for both options and how it works for the placeholder.

The styling guide explains the dragged element.

Edit this page Last updated: Nov 22, 2026