Docs
Lists

Reorder ListNew

Glass rows you reorder by holding the grip: the row lifts, its grip turns red and the others part, with a tick at each slot.

$npx swiftpieces add ReorderList
Free · MIT + Commons ClauseiOS 17.0+Liquid Glassreorderdraglistsortglasshaptics
Type
ReorderList
Files
ReorderList.swift
Depends on
Nothing (Apple frameworks only)
Version
1.0.0

Colors and spacing for ReorderList. .standard is the house palette.

Notes

  • Give it a binding to an array of Identifiable items and a row builder. A glass grip is added at the end of each row; the drop writes the new order back to the array.
  • Hold the grip briefly and the row lifts: a slight scale, a deeper shadow and a red grip, with a medium haptic. It follows the finger exactly while the rows it passes spring aside, with a selection tick at each new slot.
  • On release the move is written in the same frame the rows settle, so nothing jumps, and the dropped row springs the last few points into its slot with a success haptic.
  • Rows are spaced by the height of the first row, so keep them one height. It is a plain stack, not a List, for the short lists people arrange by hand.
  • VoiceOver gets Move up and Move down actions on every row, so it can be reordered without dragging.
  • Under Reduce Motion the lift does not scale and the rows settle without overshoot.

Usage

ReorderListExample()

Install

Pick one. Run it from the folder that contains your .xcodeproj and the files land inside your app.

Terminal

$npx swiftpieces add ReorderList

Or ask your coding agent · Claude Code, Cursor or Xcode, once the MCP server is connected

>Add the SwiftPieces "Reorder List" piece to my app

Or copy the source above into your app.

New to SwiftUI?If you know React, CSS or Tailwind, SwiftUI is easier to pick up than it looks.Try real app patterns first

Building a whole app? See SwiftPieces Pro →

All lists →

Build it yourself: SwiftUI loading states guide · SwiftUI cards guide

On this page

SwiftPiecesPro

Build the whole app with one library.

Production-ready screens, whole flows, complete app templates, a Build Kit your agent follows and Pro remixing.

Explore Pro