
Level Badge
From syxUI — written for both platforms, not translated between them.
A level progress-ring badge.
Badges · SwiftUI · iOS 17
- badges
- swiftui
The actual source
LevelBadge.swift
// Level Badge · syxUI · https://syxui.dev/components/tag-level
// 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)
// Level / progress ring badge
struct LevelBadge: View {
var body: some View {
HStack(spacing: 16) {
ZStack { Circle().stroke(tgPurple.opacity(0.15), lineWidth: 4).frame(width: 46, height: 46); Circle().trim(from: 0, to: 0.7).stroke(tgPurple, style: StrokeStyle(lineWidth: 4, lineCap: .round)).frame(width: 46, height: 46).rotationEffect(.degrees(-90)); Text("5").font(.system(size: 16, weight: .bold)) }
HStack(spacing: 5) { Image(systemName: "bolt.fill").font(.system(size: 11)); Text("Level 5").font(.system(size: 14, weight: .semibold)) }.foregroundStyle(tgPurple).padding(.horizontal, 12).padding(.vertical, 7).background(tgPurple.opacity(0.12), in: Capsule())
}
}
}
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17

