
Radio Card
From syxUI — written for both platforms, not translated between them.
A radio-station card with an on-air state.
Cards · SwiftUI · iOS 17
- cards
- swiftui
The actual source
RadioCard.swift
// Radio Card · syxUI · https://syxui.dev/components/media2-radio
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
extension View {
func formaCard(_ pad: CGFloat = 18) -> some View {
self.padding(pad)
.background(Color(.systemBackground), in: RoundedRectangle(cornerRadius: 20, style: .continuous))
.overlay(RoundedRectangle(cornerRadius: 20, style: .continuous).stroke(Color.primary.opacity(0.06), lineWidth: 1))
.shadow(color: .black.opacity(0.05), radius: 14, x: 0, y: 6)
}
}
// Radio station card
struct RadioCard: View {
var body: some View {
HStack(spacing: 14) {
ZStack { RoundedRectangle(cornerRadius: 14, style: .continuous).fill(LinearGradient(colors: [Color(red: 0.55, green: 0.40, blue: 0.90), Color(red: 0.30, green: 0.16, blue: 0.5)], startPoint: .topLeading, endPoint: .bottomTrailing)).frame(width: 64, height: 64); Image(systemName: "dot.radiowaves.left.and.right").font(.system(size: 24)).foregroundStyle(.white) }
VStack(alignment: .leading, spacing: 3) { Text("Chill Radio").font(.system(size: 16, weight: .semibold)); Text("Lo-fi beats · On air").font(.system(size: 13)).foregroundStyle(.secondary) }
Spacer()
Image(systemName: "play.circle.fill").font(.system(size: 34)).foregroundStyle(.primary)
}.formaCard(14).frame(width: 320)
}
}
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17


