talira

PopupView

Toasts, alerts, floaters, sheets and popups for SwiftUI

open sourceMITfree

PopupView is a SwiftUI library from the agency Exyte for toasts, alerts, floaters, popups and bottom sheets, shown with a .popup modifier and customised for position, animation, auto-dismiss, close on tap and drag to dismiss. Version 4 added several popups on top of each other and three ways to show one: a plain overlay, SwiftUI's full-screen sheet, or a UIKit window that can sit above the navigation bar and let taps pass through. A separate modifier shows scrollable popups with a header.

Problems it solves

  • show a toast message in a SwiftUI app
  • present a popup above the navigation bar in SwiftUI
  • a bottom sheet or floating banner for my iOS app without writing it myself

Features

  • toasts, alerts, floaters, popups and sheets via a .popup modifier
  • overlay, full-screen sheet or UIWindow display modes
  • several popups at once, with taps passing through
  • scrollable popups with a header
  • drag to dismiss, auto-dismiss and custom animations

Limitations

  • CocoaPods releases stopped after version 4.0.0; newer versions come through Swift Package Manager1
  • In the UIWindow mode, @State changes don't update the popup; use ObservableObject or @Binding instead1

Alternatives

The same job

These do what PopupView does.

  1. SwiftMessages Message bars, banners and custom popups for iOS apps in UIKit and SwiftUI

Compare PopupView with the top 3