A polished, dependency-free SwiftUI toast and snackbar library with queueing, semantic styles, gestures, and first-class accessibility.
ToastKit presents short, transient messages — toasts — over your SwiftUI
hierarchy. Toasts are plain values, presentation is driven by an observable
ToastCenter that queues them FIFO and shows one at a time, and rendering is
installed with a single SwiftUICore/View/toastKit(center:) modifier at the
root of your app.
@main struct MyApp: App {
var body: some Scene {
WindowGroup {
RootView()
.toastKit()
}
}
}
// Anywhere on the main actor:
ToastCenter.shared.present(.success("Saved"))
ToastCenter.shared.present(.error("Upload failed", title: "Network"))Toasts animate in with a spring move-and-fade (a plain crossfade when Reduce Motion is on), can be swiped away toward their edge, support tap actions, and announce themselves to VoiceOver on iOS.
- doc:GettingStarted
ToastToastCenterSwiftUICore/View/toastKit(center:)
- doc:Theming
ToastStyleToastShadow
ToastView
ToastSchedulingToastScheduledTaskTaskToastScheduler