Skip to content

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

Horizontal lists

Axis="BmotionDragAxis.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.

Draft
Review
Approved
Shipped

Current order: Draft → Review → Approved → Shipped

Grids

Axis="BmotionDragAxis.Both" reorders a layout that wraps - a CSS grid, a flex-wrap row. The dragged tile takes the cell nearest its centre and the others close up around it in reading order. From the keyboard, ←/→ move a held tile one place and ↑/↓ a row.

🍎
🍐
🍊
🍋
🍌
🍉
🍇
🍓
🍒

Current order: 🍎 🍐 🍊 🍋 🍌 🍉 🍇 🍓 🍒

Long lists

A list longer than its scroller scrolls while an item is held near its edge - faster the closer it gets - and the item travels with it, so it can be carried past what is in view. It stops at the end of the list. This is on by default; AutoScroll="false" turns it off. The page scrolls the same way when the list itself is taller than the window.

Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14

The lift and the settle

Two parameters shape how a reorder feels. WhileDrag is the overlay the held item wears - a slight scale-up by default - and takes any target, so it can lift, tilt or cast a shadow. Transition is the spring the other items make way with and the dropped one settles on - snappy by default; a softer one below lets the rows drift into place. The same overlay shows on an item picked up from the keyboard.

Buy strings
Book the studio
Mix the demo
Send it out

Keyboard access

Every list here is keyboard-reorderable out of the box (Keyboard="false" turns it off). Tab to a row and press Space or Enter to pick it up. The arrow keys move it while the others make way, Space drops it - so does moving focus away - and Escape puts it back. Each step is announced to screen readers through a live region. Announce words those announcements: it is handed a BmotionReorderAnnouncement - the Event (picked up, moved, dropped, cancelled), the Item, its 1-based Position and the Count - and returns the sentence, so it can name the item or speak another language. DefaultText is the library's own English wording. The list below names the track, and shows what a screen reader would hear.

Around the World 7:09
Da Funk 5:28
Aerodynamic 3:27
Instant Crush 5:37

The group also follows any change to 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. The same goes for any other source of order: a sort, a server push, an undo.

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