Components/Fitness/Streak Counter
Streak Counter

Streak Counter

NFrom Nibware

A streak counter with a week strip.

Fitness · 33 lines · SwiftUI · iOS 17+

The actual source

StreakCounter.swift
import SwiftUI

let ftOrange = Color(red: 0.98, green: 0.55, blue: 0.15)

extension View {
    func ftCard(_ w: CGFloat, _ pad: CGFloat = 18) -> some View {
        self.padding(pad).frame(width: w)
            .background(Color(.systemBackground), in: RoundedRectangle(cornerRadius: 20, style: .continuous))
            .overlay(RoundedRectangle(cornerRadius: 20, style: .continuous).stroke(Color.primary.opacity(0.06), lineWidth: 1))
            .shadow(color: .black.opacity(0.05), radius: 14, x: 0, y: 6)
    }
}

What it needs

Self-contained SwiftUI - system materials, SF Symbols, no external dependencies. Everything it needs - tokens, sub-views, models - is carried in the copy-paste source above.