Animated Mesh Gradient
Animated 3x3 mesh gradient background that smoothly transitions between two color palettes with a repeating animation
Free
Free with a ShipSwift account.
Copies a short instruction with your private download link. Paste it into your agent: it downloads the whole skill (the source code, the setup steps and the mistakes we already made for you) and builds the screen.
Works with
+70
What it does
Animated 3x3 mesh gradient background that smoothly transitions between two color palettes using a repeating easeInOut animation. Designed as a full-screen or section background layer. Requires iOS 18+ / macOS 15+ as MeshGradient was introduced in SwiftUI 2024.
What you get
- ✓62 lines of source code, ready to paste
- ✓Source Code
- ✓Usage
animationmeshgradientbackgroundSwiftUI
Usage
// Default indigo/blue/cyan palette
ZStack {
SWAnimatedMeshGradient()
.ignoresSafeArea()
// Your content here
}
// As a section background
myContent
.background { SWAnimatedMeshGradient() }
// Custom color palette
SWAnimatedMeshGradient(
paletteA: [
.red.opacity(0.9), .orange.opacity(0.85), .yellow.opacity(0.8),
.orange.opacity(0.85), .red.opacity(0.9), .orange.opacity(0.85),
.yellow.opacity(0.8), .orange.opacity(0.85), .red.opacity(0.9)
],
paletteB: [
.yellow.opacity(0.8), .red.opacity(0.9), .orange.opacity(0.85),
.red.opacity(0.85), .orange.opacity(0.9), .yellow.opacity(0.85),
.orange.opacity(0.85), .yellow.opacity(0.8), .red.opacity(0.9)
]
)
// Custom animation duration
SWAnimatedMeshGradient(duration: 8.0)More in Effects and animation

Metal dot fields
FreeMetal shaders: fields of dots that roll like waves and flow into living patterns, all drawn on the GPU.

Deep-space starfield
FreeA deep-space starfield in Metal: glowing nebulae drift past twinkling stars.

Neon outlines
FreeNeon outlines that bloom from the center with prism-colored edges, rendered live in Metal.

Liquid metaballs
FreeColored blobs that drift, melt into one another like liquid, and blend their colors as they merge.

3D network graph
FreeA 3D network graph you can spin. Tap any node and its links light up, with the details below.

Orbit ring and wallet
FreeItems orbit into a dotted ring, and payment cards fan out of a wallet as the balance rolls in.

Floating color dots
FreeA field of bright colored dots that float and shimmer across the whole screen.

Glass color panels
FreeStacked glass panels in mirrored layers, with neon gradients flowing through them.

Dot sphere
FreeDrag the slider and scattered points of light pull together into a perfect 3D sphere.

Cells and swirl
FreeLiving patterns: a mosaic of cells that keeps reshaping, then a hypnotic color swirl.

Noise veins and blobs
FreeOrganic noise shaders: glowing veins that pulse through the dark, then bold color blobs in constant flow.