Swift PiecesPro
  • Library
    Screens48Finished, designed screens for real apps.Templates10Complete apps built from the screens.Build Kit24Styles, briefs and recipes for your coding agentEverything58The whole library, with search
  • Docs
  • Pro

Library

  • Screens48
  • Templates10
  • Build Kit24
  • Everything58
  • Docs
  • Pro
  • Account
Get Swift Pieces ProFree library ↗
Swift PiecesPro

Production-ready SwiftUI screens and app templates for iOS. The pieces to build the whole app.

Library

  • Screens
  • Templates
  • Build Kit
  • Everything

Product

  • Pro
  • Your account
  • Sign in

Resources

  • Docs
  • CLI
  • MCP and agents
  • Free library

Social

  • X / Twitter
  • GitHub

SWIFTPIECES PRO

© 2026 Swift Pieces. One payment, lifetime access, per-developer commercial license.

Curated withby Saivion

LibraryScreensNotifications

Screen · Account

Notifications

An activity feed where new alerts land as a stack of toasts you can fan out and swipe away.

A notifications screen: grouped activity as colored blocks, filters, and live alerts that arrive as a real toast stack. Newest sits on top while older ones recede, long-press fans them out, swipe up dismisses, and each has an optional action and a duration ring that pauses while touched. The toaster works from any view in your app.

SwiftUIiOS 17.0+toast-stack

Get Swift Pieces Pro

$199 once, every piece included. See how installing works · Sign in

01

What's included

SwiftUI source you own, built on Apple frameworks only.

  • A notifications feed grouped by day with filters
  • Live toasts that stack, fan out on long-press and swipe away
  • An optional action and a duration ring that pauses while touched
  • Call toaster.show from any view; restyle with .toaster(style:)

In the Build Kit

Shop and Track (recipe). Your agent builds around this screen in the same design.

Used in

Meditation App (template), Travel App (template)

02

Implementation notes

How it behaves, what it handles, and the decisions behind it.

Install .toaster() at your root. Any view reads @Environment(Toaster.self) and calls show. Toasts stack with the newest on top and the older ones tucked behind at 0.95 and 0.9 scale; long-press fans them out, swipe up dismisses with a rubber band on the way down, and a thin ring around the icon empties as the toast's time runs out. An optional action button sits on the trailing edge. Glass on iOS 26, Material below.

Notes

  • Each toast carries a deadline. Touching or fanning the stack pauses every deadline, the ring freezes with it, and the paused time is added back on release.
  • Showing a toast posts an AccessibilityNotification.Announcement with its title and message and fires a soft haptic. Rows are combined VoiceOver elements with "Dismiss" and the action as custom actions; they carry no static-text trait.
  • The fan collapses on tap, after five seconds, or when fewer than two toasts remain. Reduce Motion shortens the stack and fan animations; Reduce Transparency uses an opaque surface.
  • Toast.Action.handler is @MainActor @Sendable, so a Toast stays Sendable and can be built off the main actor.
  • The screen builds its ToastStackStyle from the theme (info sky, success mint, warning lemon, error tangerine, solid with the blocks' ink) and owns its Toaster in @State, so the presenter survives body updates. Pass your own instance to .toaster(_:style:) the same way.
  • Today's activity is overlapping color blocks, each tucked under the next; earlier activity sits in hairline rows on a surface card. Arrivals join the feed and raise a toast, muting and Mark all read offer Undo, and the first pull to refresh fails into an error toast with Retry.
  • ToastStackExample at the end of ToastStack.swift is the Notifications screen from the preview.

03

Keep building

Pieces that work well next to this one.

Screen · Account

Settings

A settings home with a collapsing profile header, grouped rows, toggles and sign out.

Screen · Productivity

Projects

A projects screen that starts as breathing ghost rows and hands off to your real projects.

Screen · Account

Verify

A sign-in verification screen with springing digits, SMS autofill and a shake on a wrong code.