Docs
Lists

Task Row

A task card whose glass check pops as it completes, with a priority chip, swipes to complete, snooze or delete, and drag to reorder.

$npx swiftpieces add TaskRow
See it in a Pro app On a real screen in one of the Pro apps: open it with Pro, take it apart, remix it, and copy the SwiftUI.
Free · MIT + Commons ClauseiOS 17.0+Liquid Glasstasktodoswipereorderproductivityglass
Type
TaskRow
Files
TaskRow.swift
Depends on
Nothing (Apple frameworks only)
Version
2.2.0
In a full screen · SwiftPieces ProActivityAccount activity grouped by day, with rows that swipe to categorize, split or hide.

Interactive task row for to-do lists, driven by a bound Status. The card stays a solid surface; its chrome is liquid glass. The check is a glass bubble, the priority a tinted glass chip, and the swipe actions are glass bubbles that bud out from under the card's edge as it slides.

Notes

  • Rows are soft cards (style.surface, 22pt radius) with liquid glass chrome. The check is a glass bubble: clear glass with a faint ring while open, the complete tint once done, the snooze tint with a moon while snoozed. Priority sits on a small tinted glass chip (HIGH signal, MED butter, LOW sky) with dark ink; due dates carry a clock glyph; a snoozed task gets a lilac glass Snoozed chip. On iOS 26 this is Liquid Glass; before that frosted Material, and under Reduce Transparency solid fills.
  • Completion is a sequence, not a toggle: the card flashes into the solid tint block (sage by default) while the check bubble is stamped in ink and pops with a .success haptic, the check draws in with a trimmed path, the strike-through grows across the title, then the row settles back and folds down compact with a slight give (smaller padding, type and check), the ink fading to show the tinted glass and the due label and priority folding away together. Setting status to .completed from outside runs the same sequence; rows that load already completed start settled. .open reverses it: the check and strike clear quickly, the bubble's tint drains and the row opens back up. Snoozing morphs the card in place: the check turns lilac with a moon, the due label swaps for the Snoozed chip and the priority folds away, staying hidden if the snoozed task is then completed.
  • Swipe right to the 104pt detent to complete (or reopen a completed row). The card stays under the finger, and a round glass bubble buds out from under its leading edge: born there shrunk, drawn out to the middle of the gap by the swipe, its sage tint filling in as it clears the card. Its glyph stamps on with a rigid impact as the swipe arms, and past the detent the card moves against rubber-band resistance. Swipe left and Snooze (lilac) and Delete (signal) bubbles bud out the same way, only for the callbacks you pass: the outer one leads, the inner one follows a step behind, and they part through a liquid neck to rest apart. Pulled past them, the outer bubble stretches into the pull. Every bubble's label arrives once it is clear of the card and blurs away the moment the card heads home, and its tint drains as it goes back under.
  • On release the card keeps its speed: it settles into the bubbles with a visible give if the flick was heading there, more the harder you flick though never more than about a sixth of its travel past them. Let go on the right, completing or not, it comes home with a small give that stays short of the bubbles on the other side; closed from the left or flicked home fast, it comes home firmly. It springs back with a visible give from a side with nothing to reveal, and a tap on the card or a bubble snaps it home with a small give. Grab it again while it is still settling and it finishes landing under your finger. Bubbles and the check sink slightly when pressed, glass and glyph together.
  • Long-press (0.35s) to lift the row: once your finger has rested a moment the card presses into the table (a tap, scroll or swipe never dips it), then springs up to scale 1.03 with a soft impact while its shadow spreads a beat behind. Drag it vertically and onMove receives the number of row slots moved on release (negative is up). The card drops back into its slot at the speed you let go and its shadow gathers in after it, the card staying above its neighbors until both have landed, also when you let go without moving it. Animate your own array move in onMove if you want the other rows to slide. A touch the system cancels sets the card down without reporting a move. The gesture is only installed when onMove is set.
  • Reduce Motion: the swipe and the lift still track the finger, and every release lands on a short spring with no overshoot. The card doesn't press in or scale up (the shadow and haptics carry the lift), swipe bubbles wait at their places and fade in with the reveal instead of budding, the complete glyph brightens instead of stamping, the check doesn't pop, pressed bubbles and the check shade instead of sinking, labels fade instead of moving, and the completion steps crossfade at once.
  • .disabled(true) dims the row to 50% and turns off the swipe and lift.
  • Style (TaskRow.Style): surface, text, muted, ink, complete, snooze, delete, high, medium, low, cornerRadius. The tints color glass; tint: still overrides the complete color.
  • Stack rows with 8pt spacing on the ground. VoiceOver reads the row as one button with status, due date and priority, and exposes Complete/Reopen, Snooze, Delete and Move up/down as custom actions.
  • Need grouped-by-day activity with split and expanding detail? That is the Transaction Row screen in SwiftPieces Pro.

Usage

TaskRowExample().preferredColorScheme(.light)

Parameters

ParameterDescription
titleTask text.
status.open, .completed, or .snoozed. Set it from outside and the row animates to match.
dueOptional secondary label, such as "Today, 5 PM".
priorityOptional priority chip at the trailing edge.
tintColor for the check, the completion flash and the complete bubble. nil uses style.complete.
styleCard surface, text colors, priority and action tints, and corner radius. Defaults to the house palette.
onTapCalled when the row body is tapped, typically to open the task.
onSnoozeAdds a Snooze bubble behind a left swipe and is called when it is chosen.
onDeleteAdds a Delete bubble behind a left swipe and is called when it is chosen.
onMoveEnables long-press lift and reports how many rows the user dragged it (negative is up) on release.

Install

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

Terminal

$npx swiftpieces add TaskRow

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

>Add the SwiftPieces "Task Row" 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.

54 screens · 46 patterns · 48 flows · 12 templates · 31 Build Kit skills

Explore Pro