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

Skeleton Avatars

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

An avatar-row skeleton.

Loaders · SwiftUI · iOS 17

  • loaders
  • swiftui

The actual source

SkeletonAvatars.swift
// Skeleton Avatars · syxUI · https://syxui.dev/components/loader-sk-avatars
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

func sk(_ w: CGFloat, _ h: CGFloat) -> some View { RoundedRectangle(cornerRadius: 5, style: .continuous).fill(Color.primary.opacity(0.08)).frame(width: w, height: h) }
func skC(_ d: CGFloat) -> some View { Circle().fill(Color.primary.opacity(0.08)).frame(width: d, height: d) }

struct SkeletonAvatars: View { var body: some View { HStack(spacing: 14) { ForEach(0..<5, id: \.self) { _ in VStack(spacing: 6) { skC(52); sk(40, 9) } } }.frame(width: 340) } }
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17