rebeloper/SwiftUI Toast

  • $99

SwiftUI Toast

The Missing SwiftUI ProgressHUD

Here's a list of features SwiftUI Toast has to offer:
👉 Simple API
👉 Supports iOS17+
👉 Presentation modes: .top, .bottom 💎
👉 Access toast through @Environment
👉 Access the navigation with the @Environment
👉 Supports title; optional: message, icon, actions
👉 Optionally it dismisses itself after a delay
👉 Works on top of navigation bars
👉 Works with sheets
👉 Supports light and dark mode
👉 EASY 2 step setup
👉 Example Xcode Project
👉 100% Documented

Title

toast.present(title: "Hello, toast!")

Message

toast.present(title: "Hello, toast!", message: "This is a toast message.")

Icon

toast.present(title: "Hello, toast!", message: "This is a toast message.", icon: AnyView(icon()))

Actions

toast.present(title: "Hello, toast!", message: "This is a toast message.", icon: AnyView(icon()), actions: AnyView(actions()))

Bottom

toast.present(title: "Hello, toast!", message: "This is a toast message.", icon: AnyView(icon()), actions: AnyView(actions()), alignment: .bottom)

Loading

toast.present(type: .progress)

Success

toast.present(type: .success)

Error

toast.present(type: .error, message: "This is an error message.", dismissAfter: .seconds(3))

Appearance

Light

Dark

You don't have to be an advanced developer to start using SwiftUI Toast!

Step 1.

Initialise the library by adding .usesSwiftUIToast() to your root view.

Step 2.

Access the toast in any view with @Environment(\.toast) private var toast

Xcode Project

There's an example Xcode project waiting for you with all the use cases!

Contents

iOS17+

Demo.zip
Resources.zip

Downloads

Resources.zip

Documentation

Demo.zip

Compatible with:

iOS17+