
Paywall Sheet
From syxUI — written for both platforms, not translated between them.
A premium upsell sheet with features.
Cards · SwiftUI · iOS 17
- cards
- swiftui
The actual source
PaywallSheet.swift
// Paywall Sheet · syxUI · https://syxui.dev/components/sheet-paywall
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
let shGreen = Color(red: 0.16, green: 0.66, blue: 0.40)
func shCard<C: View>(_ w: CGFloat, radius: CGFloat = 18, @ViewBuilder _ c: () -> C) -> some View {
c().frame(width: w).background(Color(.systemBackground), in: RoundedRectangle(cornerRadius: radius, style: .continuous)).overlay(RoundedRectangle(cornerRadius: radius, style: .continuous).stroke(Color.primary.opacity(0.07), lineWidth: 1)).shadow(color: .black.opacity(0.05), radius: 12, y: 5)
}
// Paywall sheet
struct PaywallSheet: View {
var body: some View {
shCard(320, radius: 22) {
VStack(spacing: 12) {
Capsule().fill(Color.primary.opacity(0.2)).frame(width: 36, height: 5)
Image(systemName: "crown.fill").font(.system(size: 26)).foregroundStyle(Color(red: 0.98, green: 0.72, blue: 0.10))
Text("Go Premium").font(.system(size: 20, weight: .bold))
VStack(alignment: .leading, spacing: 8) { ForEach(["Unlimited access", "No ads", "Priority support"], id: \.self) { f in HStack(spacing: 8) { Image(systemName: "checkmark.circle.fill").foregroundStyle(shGreen).font(.system(size: 15)); Text(f).font(.system(size: 14)); Spacer() } } }
Text("Start 7-day free trial").font(.system(size: 16, weight: .semibold)).foregroundStyle(.white).frame(maxWidth: .infinity).padding(.vertical, 14).background(Color.primary, in: RoundedRectangle(cornerRadius: 14, style: .continuous))
}.padding(.horizontal, 20).padding(.top, 12).padding(.bottom, 18)
}
}
}
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17


