
Top Loading Bar
From syxUI — written for both platforms, not translated between them.
A thin top-of-page loading bar.
Loaders · SwiftUI · iOS 17
- loaders
- swiftui
The actual source
TopBarLoader.swift
// Top Loading Bar · syxUI · https://syxui.dev/components/loader-topbar
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
let ldBlue = Color(red: 0.0, green: 0.47, blue: 1.0)
struct TopBarLoader: View { var body: some View { VStack(spacing: 0) { GeometryReader { g in ZStack(alignment: .leading) { Rectangle().fill(ldBlue.opacity(0.15)).frame(height: 3); Rectangle().fill(ldBlue).frame(width: g.size.width * 0.6, height: 3) } }.frame(height: 3); HStack { Image(systemName: "chevron.left").foregroundStyle(.secondary); Spacer(); Text("Loading page…").font(.system(size: 14)).foregroundStyle(.secondary); Spacer(); Image(systemName: "arrow.clockwise").foregroundStyle(.secondary) }.padding(.top, 14) }.frame(width: 320) } }
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17


