
Team Avatars
From syxUI — written for both platforms, not translated between them.
A team row with names.
Avatars · SwiftUI · iOS 17
- avatars
- swiftui
The actual source
AvatarTeam.swift
// Team Avatars · syxUI · https://syxui.dev/components/avatar-team
// 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 AvatarTeam: View { private let team = [("person_1", "Amara"), ("person_2", "James"), ("person_4", "Arjun"), ("person_5", "Sarah")]; var body: some View { HStack(spacing: 16) { ForEach(Array(team.enumerated()), id: \.offset) { _, t in VStack(spacing: 6) { av(t.0, 54); Text(t.1).font(.system(size: 11)).foregroundStyle(.secondary) } } } } }
iOS 17 · 4 dependencies
Dependencies
- SwiftUI
- person_1 (image asset)
- person_2 (image asset)
- person_4 (image asset)
- person_5 (image asset)
Requires iOS 17