Skip to main content

DragList

The DragList widget is a scrolling list whose items you can reorder by dragging.
Use it on screens where people need to rearrange list items themselves.

info

This widget is locked on the Free plan and available on the Pro and Enterprise plans.

Definition and role

The DragList widget draws a list that scrolls vertically (the default) or horizontally, and lets you drag items to reorder them. It supports drag handle icons, whole-item dragging, multi-select moves, scroll-end detection, and entrance animations.

  • Category: Layouts
  • Default scroll direction: vertical (vertical)
  • Default item count (itemCount): 0

Features

FeatureDescription
Drag to reorderDrag and drop an item to change its position. When the move ends, the bound data list is reordered too.
Drag handleShow a drag handle icon on each item, and set its color, size, alignment, and padding.
Whole-item dragLet people grab the entire item and drag it, with no handle.
Multi-select movePair the list with a Checkbox widget to move several items at once.
Scroll controlAdjust scroll behavior such as direction, reverse, physics, and padding.
Entrance animationPlay a staggered animation as the list appears.

How to use

  1. Open the Layouts category in the left widget palette.
  2. Drag and drop the DragList item onto the canvas.
  3. Use data binding to connect the items the list shows and the item count (itemCount).
  4. Adjust the drag handle display (useDragHandler), icon, and color as needed.
  5. To handle reordering, connect the reorder events (onReorder and others) in a script.

Properties

note

The table below covers the top-level properties you see as soon as you expand the Properties panel. Grouped properties such as animation and scrollController reveal more options when expanded, and this version of the document covers only the top-level entries. The table follows the same order as the Properties panel.

PropertyDescriptionDefaultValue / Type
useDragHandlerWhether each item shows the default drag handle icontrue (on)True/false
selectWidgetIdID of the Checkbox widget used for multi-selectNot setString (widget ID)
selectPropertyNameName of the property to read the selection state from (value when not set)Not setString
handlerColorColor of the drag handle iconNot setColor
dragHandleIconIcon to use for the drag handleNot set (default handle icon)Icon settings
iconSizeSize of the handle icon24Number (px)
iconAlignmentPosition of the handle inside the itemCenter rightAlignment value
dragHandlePaddingPadding around the handleNot setPadding value
fullItemDraggableGrab and drag the entire item instead of the handlefalseTrue/false
paddingOuter padding of the listNot setPadding value
itemPaddingInner padding of each itemNot setPadding value
scrollDirectionScroll (layout) directionvertical verticalhorizontal, vertical
reverseReverse the scroll directionfalseTrue/false
scrollControllerExternal scroll controllerNot setScroll controller
primaryWhether this is the primary scroll viewNot setTrue/false
physicsScroll physicsNot setbouncing, clamping, alwaysScrollable, rangeMaintaining, neverScrollable, page
shrinkWrapShrink the list to fit its contentfalseTrue/false
anchorScroll anchor position0.0Number (0–1)
cacheExtentOff-screen area to render ahead of timeNot setNumber (px)
dragStartBehaviorHow the start of a drag is detectedstartdown, start
keyboardDismissBehaviorHow the keyboard is dismissed while scrollingNot setmanual, onDrag
restorationIdID for restoring the scroll positionNot setString
clipBehaviorClipping methodhardEdgenone, hardEdge, antiAlias, antiAliasWithSaveLayer
itemExtentFixed item sizeNot setNumber (px)
autoScrollerVelocityScalarSpeed multiplier for auto-scrolling at the edges800Number
itemCountNumber of items the list shows (data binding)0Number (integer)
animationEntrance (staggered) animation settingsNot setAnimation settings
note

Reorder and scroll events (onReorder, onScrollEnd, and others) along with item count and selection control come as script Widget Controls — see the document under Learn more below.

Notes and tips

warning

Multi-select moves work only when selectWidgetId points to the ID of the Checkbox widget that holds the selection state. Leave it unset and items move one at a time.

tip

You don't have to set dragHandleIcon — as long as useDragHandler is on, the default drag handle icon appears. Turn on fullItemDraggable to grab and drag the entire item instead of the handle.

Learn more

tip

For the full set of Widget Controls (Property, Method, and Event) that script this widget, see DragList Widget Control.