Skip to content
Indeterminate Bar preview
Rendered from the SwiftUI source on this page.

Indeterminate Bar

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

An indeterminate progress bar.

Loaders · SwiftUI · iOS 17

  • loaders
  • swiftui

The actual source

IndeterminateBar.swift
// Indeterminate Bar · syxUI · https://syxui.dev/components/loader-indeterminate
// 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 IndeterminateBar: View { var body: some View { GeometryReader { g in ZStack(alignment: .leading) { Capsule().fill(Color.primary.opacity(0.08)).frame(height: 6); Capsule().fill(ldBlue).frame(width: g.size.width * 0.4, height: 6).offset(x: g.size.width * 0.3) } }.frame(width: 280, height: 6) } }
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17