Components/Weather/Weather Widget
Weather Widget

Weather Widget

NFrom Nibware

A big weather widget with hi/lo.

Weather · 25 lines · SwiftUI · iOS 17+

The actual source

WeatherWidget.swift
import SwiftUI

func wxSky(_ w: CGFloat) -> LinearGradient {
    LinearGradient(colors: [Color(red: 0.29, green: 0.50, blue: 0.85), Color(red: 0.52, green: 0.70, blue: 0.93)], startPoint: .top, endPoint: .bottom)
}

/// A big weather widget with hi/lo.
struct WeatherHero: View {
    var body: some View {
        HStack {
            VStack(alignment: .leading, spacing: 2) {
                Text("Cupertino").font(.system(size: 15, weight: .semibold)).foregroundStyle(.white)

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.