Skip to content
Section Header preview
Rendered from the SwiftUI source on this page.

Section Header

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

A section title with a 'See all' link.

Navigation · SwiftUI · iOS 17

  • navigation
  • swiftui

The actual source

HeaderSection.swift
// Section Header · syxUI · https://syxui.dev/components/hdr-section
// 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)

// Section header with See all
struct HeaderSection: View {
    var body: some View {
        HStack(alignment: .firstTextBaseline) {
            Text("Popular this week").font(.system(size: 18, weight: .semibold))
            Spacer()
            Text("See all").font(.system(size: 14, weight: .medium)).foregroundStyle(hdrBlue)
        }.frame(width: 340)
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17