.neumorphic()

struct ContentView: View {
    
    @State private var isPressed: Bool = false
    let color = Color.red
    
    var body: some View {
        Button{
            self.isPressed.toggle()
        } label: {
            Label("Hello", systemImage: "person")
                // ๐ŸŒ€ .neumorphic()
                .neumorphic(isPressed: $isPressed, color: color)
        }
        .frame(maxWidth: .infinity, maxHeight: .infinity)
        .background(color)
        .edgesIgnoringSafeArea(.all)
    }
}

Last updated