Skip to content
Countdown Ring preview
Rendered from the SwiftUI source on this page.

Countdown Ring

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

A countdown timer ring.

Loaders · SwiftUI · iOS 17

  • loaders
  • swiftui

The actual source

CountdownRing.swift
// Countdown Ring · syxUI · https://syxui.dev/components/loader-countdown
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

struct CountdownRing: View { var body: some View { ZStack { Circle().stroke(Color.primary.opacity(0.08), lineWidth: 6).frame(width: 80, height: 80); Circle().trim(from: 0, to: 0.4).stroke(Color(red: 0.98, green: 0.55, blue: 0.10), style: StrokeStyle(lineWidth: 6, lineCap: .round)).frame(width: 80, height: 80).rotationEffect(.degrees(-90)); Text("0:24").font(.system(size: 18, weight: .bold)) } } }
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17