Skip to content
Live Banner preview
Rendered from the SwiftUI source on this page.

Live Banner

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

A live-recording banner.

Banners · SwiftUI · iOS 17

  • banners
  • swiftui

The actual source

LiveBanner.swift
// Live Banner · syxUI · https://syxui.dev/components/bt-live
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

let btRed = Color(red: 0.90, green: 0.24, blue: 0.28)

// Live recording banner
struct LiveBanner: View {
    var body: some View {
        HStack(spacing: 10) {
            Circle().fill(.white).frame(width: 8, height: 8)
            Text("LIVE").font(.system(size: 13, weight: .bold)).foregroundStyle(.white)
            Text("· Recording in progress").font(.system(size: 13)).foregroundStyle(.white.opacity(0.85))
            Spacer()
            Text("Stop").font(.system(size: 13, weight: .semibold)).foregroundStyle(btRed).padding(.horizontal, 12).padding(.vertical, 5).background(.white, in: Capsule())
        }.padding(.horizontal, 14).padding(.vertical, 11).frame(width: 330).background(btRed, in: Capsule())
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17