Skip to content
Date Nav preview
Rendered from the SwiftUI source on this page.

Date Nav

From syxUI — written for both platforms, not translated between them.

A calendar date navigator with prev/next chevrons.

Navigation · SwiftUI · iOS 17

  • navigation
  • swiftui

The actual source

HeaderDate.swift
// Date Nav · syxUI · https://syxui.dev/components/hdr-date
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

let hdrBlue = Color(red: 0.0, green: 0.47, blue: 1.0)

// Calendar date nav header
struct HeaderDate: View {
    var body: some View {
        HStack {
            Image(systemName: "chevron.left").font(.system(size: 16, weight: .semibold)).foregroundStyle(hdrBlue)
            Spacer()
            VStack(spacing: 1) {
                Text("July 2026").font(.system(size: 17, weight: .semibold))
                Text("Week 30").font(.system(size: 12)).foregroundStyle(.secondary)
            }
            Spacer()
            Image(systemName: "chevron.right").font(.system(size: 16, weight: .semibold)).foregroundStyle(hdrBlue)
        }.frame(width: 300)
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17