
Avatar Row
From syxUI — written for both platforms, not translated between them.
An avatar list row with presence.
Avatars · SwiftUI · iOS 17
- avatars
- swiftui
The actual source
AvatarListRow.swift
// Avatar Row · syxUI · https://syxui.dev/components/avatar-list-row
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
let avGreen = Color(red: 0.16, green: 0.66, blue: 0.40)
func av(_ name: String, _ d: CGFloat) -> some View { Image(name).resizable().scaledToFill().frame(width: d, height: d).clipShape(Circle()) }
struct AvatarListRow: View { var body: some View { HStack(spacing: 12) { av("person_2", 46).overlay(alignment: .bottomTrailing) { Circle().fill(avGreen).frame(width: 13, height: 13).overlay(Circle().stroke(Color(.systemBackground), lineWidth: 2)) }; VStack(alignment: .leading, spacing: 2) { Text("James Wilson").font(.system(size: 15, weight: .medium)); Text("Active now").font(.system(size: 12)).foregroundStyle(avGreen) }; Spacer(); Image(systemName: "chevron.right").font(.system(size: 13, weight: .semibold)).foregroundStyle(.secondary.opacity(0.5)) }.frame(width: 300) } }
iOS 17 · 1 dependencies
Dependencies
- SwiftUI
- person_2 (image asset)
Requires iOS 17