Swiftpack.co - Naturally-Inviting/swift-tca-custom-alert as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Naturally-Inviting.
Naturally-Inviting/swift-tca-custom-alert 0.1.1
Custom modals and alerts using SwiftUI and TCA!
⭐️ 1
🕓 8 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/Naturally-Inviting/swift-tca-custom-alert.git", from: "0.1.1")


📝 Description

This package allows for custom alert presentation with The Composable Architecture from Point-Free.


Install in Xcode as a package dependency.

  1. From the File menu, select Add Packages...
  2. Enter "https://github.com/Naturally-Inviting/swift-tca-custom-aler" into the package URL field.


To create an alert, you need to have a store which can scope the changes of CustomTcaAlert.State and CustomTcaAlert.Action. Then pass in a view as the alert content.

import TCACustomAlert

WithViewStore(store) { _ in 
  VStack {
        state: \.alertState,
        action: AlertDemoReducer.Action.alert
    content: {
        VStack(spacing: 16) {
            Button("Dismiss", action: { viewStore.send(.alert(.dismiss)) })


This demo application can be accessed via TCACustomAlert.xcworkspace.

Presentation Demo

🏎️ Road Map

  • ☑ Tests
  • ☐ Accessibility


Stars: 1
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Initial release
10 weeks ago

A small library for presenting custom alerts using SwiftUI and The Composable Architecture (TCA).

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics