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

Skeleton Text

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

Paragraph text-line skeletons.

Loaders · SwiftUI · iOS 17

  • loaders
  • swiftui

The actual source

SkeletonText.swift
// Skeleton Text · syxUI · https://syxui.dev/components/loader-sk-text
// 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) }

struct SkeletonText: View { var body: some View { VStack(alignment: .leading, spacing: 10) { sk(200, 16); sk(260, 11); sk(240, 11); sk(255, 11); sk(160, 11) }.frame(width: 280) } }
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17