
Avatar + Stat
From syxUI — written for both platforms, not translated between them.
An avatar with a follower stat.
Avatars · SwiftUI · iOS 17
- avatars
- swiftui
The actual source
AvatarStat.swift
// Avatar + Stat · syxUI · https://syxui.dev/components/avatar-stat
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
func av(_ name: String, _ d: CGFloat) -> some View { Image(name).resizable().scaledToFill().frame(width: d, height: d).clipShape(Circle()) }
struct AvatarStat: View { var body: some View { HStack(spacing: 12) { av("person_1", 56); VStack(alignment: .leading, spacing: 2) { Text("Amara Kelly").font(.system(size: 15, weight: .semibold)); Text("12.4k followers").font(.system(size: 13)).foregroundStyle(.secondary) }; Spacer() }.frame(width: 240) } }
iOS 17 · 1 dependencies
Dependencies
- SwiftUI
- person_1 (image asset)
Requires iOS 17