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

Chat Header

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

A conversation nav bar - back, avatar, name, presence and call buttons.

Chat · SwiftUI · iOS 17

  • chat
  • swiftui

The actual source

ChatHeader.swift
// Chat Header · syxUI · https://syxui.dev/components/chat-header
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

// Chat navigation header
struct ChatHeader: View {
    let blue = Color(red: 0.0, green: 0.47, blue: 1.0)
    var body: some View {
        HStack(spacing: 12) {
            Image(systemName: "chevron.left").font(.system(size: 18, weight: .semibold)).foregroundStyle(blue)
            Image("person_5").resizable().scaledToFill().frame(width: 38, height: 38).clipShape(Circle())
            VStack(alignment: .leading, spacing: 1) {
                Text("Sarah Miller").font(.system(size: 16, weight: .semibold))
                Text("Active now").font(.system(size: 12)).foregroundStyle(Color(red: 0.16, green: 0.66, blue: 0.40))
            }
            Spacer()
            Image(systemName: "phone").font(.system(size: 19)).foregroundStyle(blue)
            Image(systemName: "video").font(.system(size: 19)).foregroundStyle(blue)
        }
    }
}
iOS 17 · 1 dependencies

Dependencies

SwiftUI
  • person_5 (image asset)

Requires iOS 17