Super cool boxes with trendy neon gradient backgrounds for SwiftUI. Use the provided ViewModifiers or copy pasta and make your own :)
Add the following to your Package.swift
file:
dependencies: [
.package(url: "https://github.com/drewalth/TrendyGradients.git", from: "2.0.0")
]
import TrendyGradients
struct ContentView: View {
var body: some View {
VStack {
Text("Hello, World!")
.padding()
.background(TrendyGradient())
.cornerRadius(10)
.padding()
}.gradient(colors: (Color.pink, Color.purple))
}
}
import TrendyGradients
struct ContentView: View {
var body: some View {
VStack {
Text("Hello, World!")
.padding()
.background(TrendyGradient())
.cornerRadius(10)
.padding()
}.animatedGradient(colors1: [Color.red, Color.blue], colors2: [Color.green, Color.yellow])
}
}
import TrendyGradients
Button("Gradient Button") {
print("Button tapped")
}.gradientButton(colors: (Color.pink, Color.purple))
.foregroundColor(.white)