
Quick Dates
From syxUI — written for both platforms, not translated between them.
Quick date-selection chips.
Inputs · SwiftUI · iOS 17
- inputs
- swiftui
The actual source
PickerQuickChips.swift
// Quick Dates · syxUI · https://syxui.dev/components/picker-chips
// 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)
struct PickerQuickChips: View { var body: some View { VStack(alignment: .leading, spacing: 10) { Text("Quick select").font(.system(size: 13, weight: .semibold)).foregroundStyle(.secondary); HStack(spacing: 8) { ForEach(Array([("Today", true), ("Tomorrow", false), ("This week", false)].enumerated()), id: \.offset) { _, c in Text(c.0).font(.system(size: 13, weight: .medium)).foregroundStyle(c.1 ? .white : .primary).padding(.horizontal, 14).padding(.vertical, 8).background(c.1 ? pkBlue : Color.primary.opacity(0.06), in: Capsule()) } }; HStack(spacing: 8) { ForEach(["Next week", "This month"], id: \.self) { c in Text(c).font(.system(size: 13, weight: .medium)).padding(.horizontal, 14).padding(.vertical, 8).background(Color.primary.opacity(0.06), in: Capsule()) } } }.frame(width: 320) } }
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17


