CoffeeToast - A swift package to easily add Toast notifications to your app

Overview

CoffeeToast

Swift

A simple Swift package to add Toast Notifications to your app. Install with the Swift Package Manager.

This package uses SwiftUI and requires a target of iOS 15.0. This means that the package isn't macOS compatible yet. It's planned for a future release.

How to Use

Wrap whatever view you want the Toast notifaction to appear in in a ZStack and add Toast as the last view.

import SwiftUI
import CoffeeToast

struct ContentView: View {
    @State private var toastIsShown = false
    var body: some View {
        ZStack {
            Button("Toggle Toast") {
                toastIsShown.toggle()
            }
            Toast(isShown: $toastIsShown, color: .red, text: "TOAST NOTIFICATION", duration: 2.0)
        }
    }
}

v1 Configuration options

Background Color Text Duration Foreground Color (AKA Text Color)

You might also like...
SwiftOverlays is a Swift GUI library for displaying various popups and notifications
SwiftOverlays is a Swift GUI library for displaying various popups and notifications

SwiftOverlays is a Swift GUI library for displaying various popups and notifications. SwiftOverlays animated logo is kindly made by Crafted Pixels Fea

💌 Easy to use and customizable messages/notifications for iOS à la Tweetbot

Notice: TSMessages is no longer being maintained/updated. We recommend everyone migrate to RMessage. This repository will be kept as is for those who

[iOS] Easy, customizable notifications displayed on top of the statusbar. With progress and activity. iPhone X ready.
[iOS] Easy, customizable notifications displayed on top of the statusbar. With progress and activity. iPhone X ready.

JDStatusBarNotification Show messages on top of the status bar. Customizable colors, font and animation. Supports progress display and can show an act

BottomSheet makes it easy to add custom bottom sheets to your SwiftUI apps.
BottomSheet makes it easy to add custom bottom sheets to your SwiftUI apps.

BottomSheet About BottomSheet BottomSheet makes it easy to add custom bottom sheets to your SwiftUI apps. The result can look like this...or completel

SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.

SwiftEntryKit 🤗 Donations can be made here. Table of Contents Overview Features Example Project Example Project Installation Presets Playground Requi

A Swift package for iOS/tvOS for easy alert presentation

AlertPresenter Listed on the Swift Package Index and originally posted on my blog. It can be fiddly to handle the presentation of alerts on a specific

Swift Package mimicking UIKit's ActionSheet with added features
Swift Package mimicking UIKit's ActionSheet with added features

ActionSheetController A Swift package that mimics the UIAlertController Actionsheet with added features. ActionSheetController gives you the ability t

Easily create different alerts in SwiftUI

AlertWizard 🧙🏻‍♂️ This package lets you easily create different alerts in SwiftUI with the call of a single function. As this is my first package th

BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.
BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

BPStatusBarAlert BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

Releases(2.0.0)
  • 2.0.0(Feb 3, 2022)

    This release changes how to use the package.

    What's Changed

    • Add Content View by @Drag0ndust in https://github.com/maeganwilson/CoffeeToast/pull/3
    • Adjusting comment documentation by @maeganwilson in https://github.com/maeganwilson/CoffeeToast/pull/5

    New Contributors

    • @Drag0ndust made their first contribution in https://github.com/maeganwilson/CoffeeToast/pull/3

    Full Changelog: https://github.com/maeganwilson/CoffeeToast/compare/1.0.1...2.0.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Feb 2, 2022)

    What's Changed

    • Adding tests and documentation by @maeganwilson in https://github.com/maeganwilson/CoffeeToast/pull/2

    Full Changelog: https://github.com/maeganwilson/CoffeeToast/compare/1.0.0...1.0.1

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Feb 2, 2022)

    CoffeeToast

    A simple Swift package to add Toast Notifications to your app.

    This package uses SwiftUI and requires a target of iOS 15.0.

    How to Use

    Wrap whatever view you want the Toast notifaction to appear in in a ZStack and add Toast as the last view.

    import SwiftUI
    import CoffeeToast
    
    struct ContentView: View {
        @State private var toastIsShown = false
        var body: some View {
            ZStack {
                Button("Toggle Toast") {
                    toastIsShown.toggle()
                }
                Toast(isShown: $toastIsShown, color: .red, text: "TOAST NOTIFICATION", duration: 2.0)
            }
        }
    }
    

    v1 Configuration options

    Background Color Text Duration Foreground Color (AKA Text Color)

    Source code(tar.gz)
    Source code(zip)
Owner
Maegan Wilson
Swift Developer that dabbles in JavaScript
Maegan Wilson
A Swift extension that adds toast notifications to the UIView object class.

Toast-Swift Toast-Swift is a Swift extension that adds toast notifications to the UIView object class. It is intended to be simple, lightweight, and e

Charles Scalesse 3.3k Dec 22, 2022
LCToast - Add toast to UIView.

LCToast Add toast to UIView. Requirements iOS 8.0+ Features The LCToast is a comparison of features with Toast and SVProgressHUD. LCToast Toast SVProg

LiuChang 158 Nov 22, 2022
A modern iOS toast view that can fit your notification needs

CRToast CRToast is a library that allows you to easily create notifications that appear on top of or by pushing out the status bar or navigation bar.

Collin Ruffenach 4.2k Dec 30, 2022
A Swift Toast view - iOS 14 style and newer - built with UIKit. 🍞

Toast-Swift A Swift Toast view - iOS 14 style - built with UIKit. ?? Installation Swift Package Manager You can use The Swift Package Manager to insta

Bastiaan Jansen 216 Jan 4, 2023
🍞 Toast for Swift

Toaster Android-like toast with very simple interface. (formerly JLToast) Screenshots Features Queueing: Centralized toast center manages the toast qu

Suyeol Jeon 1.6k Dec 30, 2022
A Simple Toast Library for iOS

PowerplayToastKit Toasts Type Success. Warning Error Info Custom View (Dialog) Example To run the example project, clone the repo, and run pod install

Mithilesh Parmar 18 Jul 2, 2022
Bulletin / 'Toast' style view for tvOS.

KBBulletinView Bulletin / 'Toast' style view for tvOS. This project is an effort to create local application notifications/alerts similar to those use

Kevin Bradley 4 Nov 26, 2022
Simple Swift in-app notifications

LNRSimpleNotifications TSMessages is an amazingly powerful in-app notifications library but requires a lot of setup. LNRSimpleNotifications is a simpl

LISNR 203 Nov 20, 2022
Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside

Description ?? Break the silence of your UI, whispering, shouting or whistling at it. Whisper is a component that will make the task of displaying mes

HyperRedink 3.7k Dec 25, 2022
A simple style messages/notifications, in Swift.

Demo Example To show notifications use the following code: self.showMessage("Something success", type: .success) To display a notice on a view: view.s

Gesen 704 Dec 17, 2022