Docs

Advent · Day 1

This one opens on December 1.

Every door opens at midnight Pacific.

See the calendar
Sheets

Step TrayNew

One tray for a short flow: each step resizes the same surface on a spring while the red button morphs its label.

By

Step Tray: SwiftUI Multi-Step Bottom Sheet for iOS, live preview in light mode

Step Tray, a SwiftUI Multi-Step Bottom Sheet for iOS 17+, in its live preview. Open Code for the Swift source.

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

Colors and shape of a StepTray. .standard is the house palette.

Notes

  • StepTray(step:button:action:content:) shows one step of a short flow in a single tray: an amount, a review, a done state. You own step. Change it from the button's action, or from anywhere else, and the tray moves to that step.
  • The tray takes on each step's natural height on a spring. The step that is leaving blurs out quickly, and the new step blurs in just after, so you never see two at once.
  • The red button stays at the bottom, where the thumb is. Its label is the button you pass, and it changes letter by letter: letters the old and new labels share hold still, and the rest blur across.
  • Place the tray at the bottom of its space, for example .frame(maxHeight: .infinity, alignment: .bottom), so it grows and shrinks upward.
  • Each step change plays a light haptic tick.
  • Under Reduce Motion the tray resizes without a spring, and the steps cross-fade.

Usage

StepTrayExample()

Install

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

Terminal

$npx swiftpieces add StepTray

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

>Add the SwiftPieces "Step Tray" 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 sheets →

Build it yourself: SwiftUI haptics 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