Custom Toasts is so cool!
I built a flexible and stylish toast modifier with SwiftUI using @Kavsoft's interactive toasts. 😄🔥
This project showcases how to create reusable, animated, and customizable toast notifications for SwiftUI apps – perfect for alerts, actions, or just a bit of UI flair.
🚀 Features
-
Fully custom ViewModifier for reusable toasts
-
Smooth animations and transitions
-
Support for multiple toast types (info, success, error, etc.)
-
Interactive gestures thanks to Kavsoft’s toast system
-
Lightweight, SwiftUI-native
📸 Preview
Toasts.mp4
🛠 Usage Add the Modifier
var body: some View {
NavigationStack {
List {
Section("Toaster Examples") {
Button {
vm.showSuccessToaster()
} label: {
HStack(spacing: 10) {
Image(systemName: "checkmark.circle.fill")
Text("Success")
}
.foregroundStyle(.green)
}
}
}
.withToastsMod()
}
}
Customize Your Toast
You can easily extend the toast modifier to support:
-
Icons
-
Text
-
Colors
-
Custom button in toast
-
Auto-dismiss timers
-
Interactive swipe-to-dismiss
💬 Why I Built This
I love SwiftUI’s declarative style – but sometimes, native alerts or notifications can feel limited. So I crafted this system to be:
✨ Minimal • 💡 Flexible • 🔁 Reusable • 😄 So Fun
🧪 Coming Soon
-
Light/Dark mode support
-
More animation styles
-
Queueing multiple toasts
-
SPM-ready package (optional)
📄 License
MIT – use it, fork it, toast it up.