- August 28, 2025
- Mins Read
import AnimatedGradient
struct ContentView: View {
var body: some View {
AnimatedLinearGradient(colors: [.red, .green, .blue])
}
}
import AnimatedGradient
struct ContentView: View {
var body: some View {
AnimatedLinearGradient(colors: [.red, .green, .blue])
.numberOfSimultaneousColors(2)
.setAnimation(.linear(duration: 5))
.gradientPoints(start: .bottomLeading, end: .topTrailing)
}
}
colors
– An array of colors between which the gradient will transitionnumberOfSimultaneousColors(Int)
– Number of colors on screen at any given time, can be more, equal or less than colors in the arraysetAnimation(Animation)
– Animation of the transition of one color to anothergradientPoints(start:end:)
– Standard linear gradient control pointsYou can use preselected colors from GradientPreset for a quick start
To try AnimatedGradient examples:
https://github.com/exyte/AnimatedGradient.git
AnimatedGradientExample.xcodeproj
dependencies: [
.package(url: “https://github.com/exyte/AnimatedGradient.git”)
]
This package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...
Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...