
Playlist Row
From syxUI — written for both platforms, not translated between them.
A playlist row with cover, count and duration.
Cards · SwiftUI · iOS 17
- cards
- swiftui
The actual source
PlaylistRow.swift
// Playlist Row · syxUI · https://syxui.dev/components/media2-playlist-row
// 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)
}
}
// Playlist row
struct PlaylistRow: View {
var body: some View {
HStack(spacing: 12) {
RoundedRectangle(cornerRadius: 10, style: .continuous).fill(LinearGradient(colors: [Color(red: 0.98, green: 0.42, blue: 0.36), Color(red: 0.85, green: 0.18, blue: 0.22)], startPoint: .topLeading, endPoint: .bottomTrailing)).frame(width: 56, height: 56).overlay(Image(systemName: "music.note.list").font(.system(size: 20)).foregroundStyle(.white))
VStack(alignment: .leading, spacing: 2) { Text("Chill Vibes").font(.system(size: 16, weight: .semibold)); Text("48 songs · 2h 54m").font(.system(size: 13)).foregroundStyle(.secondary) }
Spacer()
Image(systemName: "ellipsis").foregroundStyle(.secondary)
}.formaCard(14).frame(width: 320)
}
}
iOS 17 · No dependencies
Dependencies
- SwiftUI
- No external dependencies
Requires iOS 17


