SwiftClockKit – Beautifully Designed, Code-Rendered Clock Faces for Your SwiftUI
  • July 9, 2025

SwiftClockKit provides elegant, customizable clock views for SwiftUI projects—drawn entirely with code, no images! Each clock face features meticulously designed details with realistic skeuomorphic effects, all achieved purely through SwiftUI.

✨ Features


  • 🌟 Beautifully Designed Styles: Each clock style is crafted with attention to detail. All effects—shadows, highlights, and textures—are rendered in real-time using only SwiftUI.

  • 🎨 Simple Customization:   * Multiple design styles (starting with .braun)   * Works seamlessly with system themes (light/dark)   * Toggle visual details like reflections

  • ⏱️ Flexible Time Display: Show the current system time or initialize with any specific time (great for different timezones or events)

  • 📱 Cross-Platform: Works on iOS, macOS, and watchOS

  • 💻 Pure SwiftUI: No images or external dependencies—just clean SwiftUI code

🚀 Quick Start


Add a live clock to your app in seconds:

 

import SwiftUI
import SwiftClockKit

struct ContentView: View {
var body: some View {
ClockView() // That’s it! Live system time with the default .braun style
.frame(width: 250, height: 250)
}
}

🚀 Running the Demo Application


 

To see SwiftClockKit in action and experiment with its features, you can run the included demo application. The demo showcases the ClockView and allows you to interactively change its appearance and time settings.

Steps to run the demo:

  1. In your local copy of the repository, navigate to the folder SwiftClockKitDemo. It contains the demo application.
  2. Inside this folder, locate and open the Xcode project file (e.g., SwiftClockKitDemo.xcodeproj) in Xcode.
  3. Click the “Run” button (or press Command+R).

SwiftClockKit Demo App Screenshot

📦 Installation


 

Swift Package Manager

 

Add SwiftClockKit to your project in Xcode:

  1. Select File > Add Packages…
  2. Enter the repository URL: https://github.com/ibvildthings/SwiftClockKit.git
  3. Choose the latest version and click Add Package

Or add it to your Package.swift:

dependencies: [
.package(url: “https://github.com/ibvildthings/SwiftClockKit.git”, from: “1.0.0”)
]

🖼️ Examples


 

Default Clock with System Appearance

 

Default Clock Example

The simplest implementation shows the current time and automatically adapts to light/dark mode:

ClockView() // Defaults to .braun style, .system appearance, with reflections
.frame(width: 250, height: 250)

Light & Dark Mode Examples

 

Braun Clock with dark mode

Explicitly set the appearance for your clock:

HStack(spacing: 20) {
ClockView(appearance: .light)
.frame(width: 150, height: 150)

ClockView(appearance: .dark)
.frame(width: 150, height: 150)
.background(Color.black.opacity(0.8))
.cornerRadius(10)
}

Showing a Different Timezone

 

Display the time for a specific location:

struct LondonClockView: View {
@State private var londonTime: Date = {
// Get current time in London
var calendar = Calendar.current
calendar.timeZone = TimeZone(identifier: “Europe/London”) ?? .current
let londonComponents = calendar.dateComponents(
[.year, .month, .day, .hour, .minute, .second],
from: Date()
)
return Calendar.current.date(from: londonComponents) ?? Date()
}()

var body: some View {
VStack {
Text(“London Time”).font(.headline)

ClockView(date: $londonTime)
.frame(width: 200, height: 200)
}
}
}

⚙️ Customization Options


Available Parameters

 

ClockView can be customized with these parameters:

ClockView(
style: ClockStyle = .braun,   // Visual style of the clock
date: Binding<Date>? = nil,       // Optional starting time (defaults to current system time)
appearance: AppearanceScheme = .system,  // Light, dark, or system-based
showReflections: Bool = true      // Toggle reflection effects
)

Clock Styles

 

Currently available styles:

  • .braun – Clean, elegant design inspired by classic Braun aesthetic

  • .vone – Modern, minimalist design by vone

Vone Clock Preview

More styles coming in future updates!

Appearance Options

 

  • .light – Forces light theme
  • .dark – Forces dark theme
  • .system – Adapts to system appearance (default)

📋 Requirements


  • iOS 15.0+
  • macOS 11.0+
  • watchOS 7.0+
  • Swift 5.7+ (Swift 5.9+ recommended)
  • Xcode 14.0+ (Xcode 15+ recommended)

GitHub


View Github

YOU MIGHT ALSO LIKE...
MijickPopups Hero

  Popups Alerts Resizable Sheets Banners

SwiftUI Tooltip

This package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...

SimpleToast for SwiftUI

SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...

SSToastMessage

Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...

ToastUI

A simple way to show toast in SwiftUI   Getting Started • Documentation • Change Log