Skip to content
Loading Button preview
Rendered from the SwiftUI source on this page.

Loading Button

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

A button in a loading state.

Loaders · SwiftUI · iOS 17

  • loaders
  • swiftui

The actual source

LoadingButtonLoader.swift
// Loading Button · syxUI · https://syxui.dev/components/loader-button
// 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 LoadingButtonLoader: View { var body: some View { HStack(spacing: 10) { Circle().trim(from: 0, to: 0.7).stroke(.white, style: StrokeStyle(lineWidth: 2.5, lineCap: .round)).frame(width: 18, height: 18); Text("Please wait…").font(.system(size: 16, weight: .semibold)).foregroundStyle(.white) }.frame(width: 240).padding(.vertical, 14).background(ldBlue, in: RoundedRectangle(cornerRadius: 14, style: .continuous)) } }
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17