Skip to content
Dots Loader preview
Rendered from the SwiftUI source on this page.

Dots Loader

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

A three-dot bouncing loader.

Loaders · SwiftUI · iOS 17

  • loaders
  • swiftui

The actual source

DotsLoader.swift
// Dots Loader · syxUI · https://syxui.dev/components/loader-dots
// 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 DotsLoader: View { var body: some View { HStack(spacing: 10) { ForEach(0..<3, id: \.self) { i in Circle().fill(ldBlue.opacity(i == 0 ? 1 : (i == 1 ? 0.6 : 0.3))).frame(width: 14, height: 14) } } } }
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17