
Confirm Popover
From syxUI — written for both platforms, not translated between them.
A delete confirmation popover.
Feedback · SwiftUI · iOS 17
- feedback
- swiftui
The actual source
ConfirmPopover.swift
// Confirm Popover · syxUI · https://syxui.dev/components/tip-confirm
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
let ttRed = Color(red: 0.90, green: 0.24, blue: 0.28)
struct ConfirmPopover: View { var body: some View { VStack(spacing: -2) { VStack(spacing: 10) { Text("Delete this item?").font(.system(size: 14, weight: .semibold)); HStack(spacing: 8) { Text("Cancel").font(.system(size: 13, weight: .medium)).foregroundStyle(.secondary).frame(maxWidth: .infinity).padding(.vertical, 8).background(Color.primary.opacity(0.06), in: RoundedRectangle(cornerRadius: 9)); Text("Delete").font(.system(size: 13, weight: .semibold)).foregroundStyle(.white).frame(maxWidth: .infinity).padding(.vertical, 8).background(ttRed, in: RoundedRectangle(cornerRadius: 9)) } }.padding(14).frame(width: 210).background(Color(.systemBackground), in: RoundedRectangle(cornerRadius: 14, style: .continuous)).overlay(RoundedRectangle(cornerRadius: 14, style: .continuous).stroke(Color.primary.opacity(0.07), lineWidth: 1)).shadow(color: .black.opacity(0.1), radius: 12, y: 4); Image(systemName: "arrowtriangle.down.fill").font(.system(size: 12)).foregroundStyle(Color(.systemBackground)).offset(y: -1) } } }
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17


