Skip to content
System Message preview
Rendered from the SwiftUI source on this page.

System Message

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

A centered system notice - 'You added Maya to the conversation'.

Chat · SwiftUI · iOS 17

  • chat
  • swiftui

The actual source

ChatSystemMessage.swift
// System Message · syxUI · https://syxui.dev/components/chat-system
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

// System message
struct ChatSystemMessage: View {
    var body: some View {
        HStack {
            Spacer()
            Text("You added Maya to the conversation")
                .font(.system(size: 12)).foregroundStyle(.secondary).multilineTextAlignment(.center)
                .padding(.horizontal, 12).padding(.vertical, 6)
                .background(Color.primary.opacity(0.05), in: Capsule())
            Spacer()
        }
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17