Here's a quick ViewModifier that generates a background for your card content. Perfect for iOS 14 Widget backgrounds or horizontal lists inside your SwiftUI apps.

How to use

struct ContentView: View {
    var body: some View {
        VStack {
            ProjectCell()
                .modifier(EasyCardModifier(color: .blue))
        }
            
    }
}

Code

Below is the custom ViewModifier I use and the CircleCardBackground that generates the background based on the passed in Color.

struct EasyCardModifier : ViewModifier {
    
    var color: Color = .blue
    
    func body(content: Content) -> some View {
        content
            .background(CircleCardBackground(color: color))
            .cornerRadius(10)
            .shadow(color: color.opacity(0.4), radius: 15, x: 0, y: 0)
    }
}

struct CircleCardBackground: View {
    
    var color: Color
    
    var body: some View {
        ZStack(alignment: .bottomLeading) {
            LinearGradient(gradient: Gradient(colors: [color, color.opacity(0.8)]), startPoint: .bottomLeading, endPoint: .topTrailing)
            HStack {
                GeometryReader { geo in
                    LinearGradient(gradient: Gradient(colors: [color, color.opacity(0), color.opacity(0)]), startPoint: .top, endPoint: .bottom)
                        .clipShape(Circle())
                        .brightness(0.15)
                        .scaleEffect(1.5, anchor: .center)
                        .offset(x: geo.size.width / 2 * -1, y : geo.size.height / 3)
                        
                }
                Spacer()

            }
            
            HStack {
                GeometryReader { geo in
                    LinearGradient(gradient: Gradient(colors: [color, color.opacity(0), color.opacity(0)]), startPoint: .topTrailing, endPoint: .leading)
                        .clipShape(Circle())
                        .brightness(0.25)
                        .scaleEffect(1.2, anchor: .center)
                        .offset(x: geo.size.width / 2 * -1, y : geo.size.height / 2)
                }
                Spacer()

            }
        }
    }
}