Skip to content
Progress Row preview
Rendered from the SwiftUI source on this page.

Progress Row

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

A row with an inline progress bar.

Cards · SwiftUI · iOS 17

  • cards
  • swiftui

The actual source

ProgressRow.swift
// Progress Row · syxUI · https://syxui.dev/components/list-progress
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

let listBlue = Color(red: 0.0, green: 0.47, blue: 1.0)

extension View {
    func formaCard(_ pad: CGFloat = 18) -> some View {
        self.padding(pad)
            .background(Color(.systemBackground), in: RoundedRectangle(cornerRadius: 20, style: .continuous))
            .overlay(RoundedRectangle(cornerRadius: 20, style: .continuous).stroke(Color.primary.opacity(0.06), lineWidth: 1))
            .shadow(color: .black.opacity(0.05), radius: 14, x: 0, y: 6)
    }
}

// Row with progress
struct ProgressRow: View {
    var body: some View {
        HStack(spacing: 12) {
            Image(systemName: "icloud.fill").font(.system(size: 16)).foregroundStyle(listBlue)
            VStack(alignment: .leading, spacing: 5) { HStack { Text("iCloud Storage").font(.system(size: 15)); Spacer(); Text("34 / 50 GB").font(.system(size: 12)).foregroundStyle(.secondary) }; GeometryReader { g in ZStack(alignment: .leading) { Capsule().fill(Color.primary.opacity(0.08)).frame(height: 5); Capsule().fill(listBlue).frame(width: g.size.width * 0.68, height: 5) } }.frame(height: 5) }
        }.formaCard(14).frame(width: 320)
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17