
Avatar Pair
From syxUI — written for both platforms, not translated between them.
Two overlapping avatars for a DM.
Avatars · SwiftUI · iOS 17
- avatars
- swiftui
The actual source
AvatarPair.swift
// Avatar Pair · syxUI · https://syxui.dev/components/avatar-pair
// 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 AvatarPair: View { var body: some View { HStack(spacing: -12) { av("person_2", 44).overlay(Circle().stroke(Color(.systemBackground), lineWidth: 2.5)); av("person_3", 44).overlay(Circle().stroke(Color(.systemBackground), lineWidth: 2.5)) } } }
iOS 17 · 2 dependencies
Dependencies
- SwiftUI
- person_2 (image asset)
- person_3 (image asset)
Requires iOS 17