
Activity Ring
From syxUI — written for both platforms, not translated between them.
An avatar inside an activity ring.
Avatars · SwiftUI · iOS 17
- avatars
- swiftui
The actual source
AvatarActivityRing.swift
// Activity Ring · syxUI · https://syxui.dev/components/avatar-activity
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
let avOrange = Color(red: 0.98, green: 0.55, blue: 0.10)
func av(_ name: String, _ d: CGFloat) -> some View { Image(name).resizable().scaledToFill().frame(width: d, height: d).clipShape(Circle()) }
struct AvatarActivityRing: View { var body: some View { ZStack { Circle().stroke(avOrange.opacity(0.15), lineWidth: 4).frame(width: 68, height: 68); Circle().trim(from: 0, to: 0.72).stroke(avOrange, style: StrokeStyle(lineWidth: 4, lineCap: .round)).frame(width: 68, height: 68).rotationEffect(.degrees(-90)); av("person_1", 54) } } }
iOS 17 · 1 dependencies
Dependencies
- SwiftUI
- person_1 (image asset)
Requires iOS 17