Skip to content
Placeholder Avatars preview
Rendered from the SwiftUI source on this page.

Placeholder Avatars

From syxUI — written for both platforms, not translated between them.

Empty person placeholders in sizes.

Avatars · SwiftUI · iOS 17

  • avatars
  • swiftui

The actual source

AvatarPlaceholder.swift
// Placeholder Avatars · syxUI · https://syxui.dev/components/avatar-placeholder
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

struct AvatarPlaceholder: View { var body: some View { HStack(spacing: 14) { ForEach(Array([48.0, 60, 72].enumerated()), id: \.offset) { _, d in Circle().fill(Color.primary.opacity(0.08)).frame(width: d, height: d).overlay(Image(systemName: "person.fill").font(.system(size: d * 0.4)).foregroundStyle(.secondary.opacity(0.6))) } } } }
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17