
Pro Badges
From syxUI — written for both platforms, not translated between them.
Pro / premium membership badges.
Badges · SwiftUI · iOS 17
- badges
- swiftui
The actual source
ProBadges.swift
// Pro Badges · syxUI · https://syxui.dev/components/tag-pro
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
let tgPurple = Color(red: 0.55, green: 0.40, blue: 0.90)
let tgIndigo = Color(red: 0.35, green: 0.34, blue: 0.84)
// Pro / premium badges
struct ProBadges: View {
var body: some View {
HStack(spacing: 8) {
Text("PRO").font(.system(size: 12, weight: .bold)).foregroundStyle(.white).padding(.horizontal, 10).padding(.vertical, 5).background(LinearGradient(colors: [tgPurple, tgIndigo], startPoint: .leading, endPoint: .trailing), in: Capsule())
Text("PLUS").font(.system(size: 12, weight: .bold)).foregroundStyle(.white).padding(.horizontal, 10).padding(.vertical, 5).background(Color.primary, in: Capsule())
HStack(spacing: 4) { Image(systemName: "crown.fill").font(.system(size: 10)); Text("PREMIUM").font(.system(size: 12, weight: .bold)) }.foregroundStyle(Color(red: 0.7, green: 0.5, blue: 0.1)).padding(.horizontal, 10).padding(.vertical, 5).background(Color(red: 0.98, green: 0.72, blue: 0.10).opacity(0.18), in: Capsule())
}
}
}
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17

