Spelte

Open Github

Animated Gradient

Animated gradient background with presets and customizable swirl effects using WebGL.

Animated

Gradient

Installation

pnpm dlx shadcn-svelte@latest add https://spelte.dev/r/animated-gradient.json

Examples

Presets

Lava

Custom Configuration

Ocean

Props

PropTypeDefault
config
{ preset: PresetName } | { preset: "custom"; color1: string; color2: string; color3: string; ... }
{ preset: "Prism" }
noise
{ opacity: number; scale?: number }
-
radius
string
"0px"
style
string
-
class
string
-

Custom Config Options

When using preset: "custom", these options are available:

PropTypeDefault
color1
string
required
color2
string
required
color3
string
required
rotation
number
0
proportion
number
35
scale
number
1
speed
number
25
distortion
number
12
swirl
number
80
swirlIterations
number
10
softness
number
100
offset
number
0
shape
"Checks" | "Stripes" | "Edge"
"Checks"
shapeSize
number
10