loading

Reorder

Drag-to-reorder is the one interaction where the naive implementation is always wrong: re-render the list on every pointer move and you drop frames, lose focus and reset component state. BmotionReorderGroup previews the new order with transforms only - the list itself re-renders once, on release - so the drag stays smooth and the bound list is the single source of truth throughout.

Drag to reorder

Bind a list, give the items a stable key, and every row becomes draggable along the list axis while its siblings spring out of the way. HandleSelector restricts the gesture to a grip inside each row so the rest of it stays clickable and selectable, and OnReorder fires once the new order has been committed.

One More Time 5:20
Digital Love 4:58
Harder Better Faster 3:45
Something About Us 3:51
Voyager 3:47

Current order: One More Time → Digital Love → Harder Better Faster → Something About Us → Voyager
Committed reorders: 0

Razor

Horizontal lists

Axis="BmDragAxis.X" runs the same machinery sideways for a row of tabs, a toolbar or a card rail. Only the axis changes - the displacement, the commit and the binding all behave identically. Wrapping grids are not supported: the group needs a single line to reason about order along.

Draft
Review
Approved
Shipped

Current order: Draft → Review → Approved → Shipped

Razor

Keyboard access

A pointer drag is not reachable by keyboard, so a reorderable list needs a second way in - and it does not need to be a separate mechanism. The group observes external mutations of the bound list, so plain move-up / move-down buttons that reorder Items directly (the ▲▼ controls in the first sample) animate exactly like a drag would. The same applies to any other source of order: a sort, a server push, an undo.

Razor
Bmotion 0 el · 0 active
An unhandled error has occurred. Reload 🗙