
Month Grid
From syxUI — written for both platforms, not translated between them.
A month-of-year grid.
Inputs · SwiftUI · iOS 17
- inputs
- swiftui
The actual source
PickerMonthGrid.swift
// Month Grid · syxUI · https://syxui.dev/components/picker-months
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
let pkBlue = Color(red: 0.0, green: 0.47, blue: 1.0)
extension View {
func formaCard(_ pad: CGFloat = 18) -> some View {
self.padding(pad)
.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)
}
}
struct PickerMonthGrid: View { var body: some View { VStack(spacing: 12) { HStack { Text("2026").font(.system(size: 16, weight: .semibold)); Spacer() }; LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 10), count: 3), spacing: 10) { ForEach(Array(["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"].enumerated()), id: \.offset) { i, m in Text(m).font(.system(size: 14, weight: i == 6 ? .semibold : .regular)).foregroundStyle(i == 6 ? .white : .primary).frame(maxWidth: .infinity).padding(.vertical, 11).background(i == 6 ? pkBlue : Color.primary.opacity(0.05), in: RoundedRectangle(cornerRadius: 10)) } } }.formaCard().frame(width: 280) } }
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17


