Elegant SwiftUI library for customizable Toast Notifications and Custom Alerts
Works across iOS, macOS, watchOS, tvOS — and ready for the future (VisionOS, etc.)
Elegant SwiftUI library for customizable Toast Notifications and Custom Alerts
Works across iOS, macOS, watchOS, tvOS — and ready for the future (VisionOS, etc.)
- ✅ Show toasts with message, icon, color, and auto-dismiss timer
- ✅ Custom alerts with two buttons (e.g., Yes/No, Continue/Cancel)
- ✅ Fully customizable appearance (colors, duration, background)
- ✅ Designed for reusability — use in any SwiftUI project
- ✅ Cross-platform ready (iOS, macOS, watchOS, tvOS)
Add this URL to Xcode: https://github.com/RJIOSDEV/ToastifySwift
Or in Package.swift
:
.package(url: "https://github.com/RJIOSDEV/ToastifySwift", from: "1.0.0")
##
Or COCOAPODS
pod 'ToastifySwift', '~> 1.0.3'
---
## 🧑💻 Usage
### Show a Toast
```swift
@StateObject var toastManager = ToastManager()
.toastify(using: toastManager)
toastManager.show(toast: ToastModel(
message: "Saved successfully!",
icon: "checkmark.circle.fill",
backgroundColor: .green,
duration: 2.5
))
---
## 📚 Documentation
### ToastManager
A shared `ObservableObject` that triggers toast messages globally.
```swift
@StateObject var toastManager = ToastManager()