Dialoggy is a lightweight and flexible SwiftUI library for displaying custom dialogs in iOS apps.
- Fully customizable buttons, fonts, and colors
- Easy to integrate via
.dialogable()modifier - Supports multiple actions
- Optional icon/image support
- iOS 17+ compatibility
Swift Package Manager
Add Dialoggy to your Package.swift:
.package(url: "https://github.com/yourname/Dialoggy.git", from: "1.0.4")Or via Xcode:
File → Add Packages… and paste the repo URL.
struct ContentView: View {
@State private var dialog: DialogModel?
var body: some View {
VStack {
Button("Show Dialog") {
dialog = DialogModel(
title: "Hello!",
message: "This is an example dialog.",
actions: [
DialogAction(title: "OK", style: .primary) {
dialog = nil
}
]
)
}
}
.dialog($dialog)
.dialogable(style: DialogStyleConfig.default)
}
}DialogStyleConfig(
primaryButtonStyle: DialogButtonStyle(
backgroundColor: .blue,
foregroundColor: .white,
cornerRadius: 10
),
secondaryButtonStyle: DialogButtonStyle(
backgroundColor: .gray.opacity(0.2),
foregroundColor: .black,
cornerRadius: 10
),
titleFont: .title2,
titleForegroundColor: .primary,
messageFont: .body,
messageForegroundColor: .secondary,
imageSize: CGSize(width: 64, height: 64)
)See Examples/DialoggyDemo.swift for a live demo with multiple configurations.
MIT

