Screen · Account
Notifications SwiftUI Screen
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.
- SwiftUI
- iOS 17.0+
- toast-stack
$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.showfrom 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.Announcementwith 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.handleris@MainActor @Sendable, so aToaststaysSendableand can be built off the main actor.- The screen builds its
ToastStackStylefrom the theme (info sky, success mint, warning lemon, error tangerine, solid with the blocks' ink) and owns itsToasterin@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.
ToastStackExampleat the end ofToastStack.swiftis the Notifications screen from the preview.
03
Keep building
Pieces that work well next to this one.