Skip to content

velvetk/SwiftUIBanner

 
 

Repository files navigation

SwiftUIBanner

Notification Banner built with SwiftUI.

banner_gif

How To Use

struct ContentView: View {
    
    @State var showBanner:Bool = true
    @State var bannerData: BannerModifier.BannerData = BannerModifier.BannerData(title: "Default Title", detail: "This is the detail text for the action you just did or whatever blah blah blah blah blah", type: .Info)
    // Also Supports Banner Types .Success, .Warning, .Error
    
    var body: some View {
        Text("Hello Trailing Closure")
            .banner(data: $bannerData, show: $showBanner)
            // Simply add the Banner to your root view, and control it using State variables.
    }
}

About

SwiftUIBanner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%