Skip to main content

Background (gradient & patterns)

An interactive radial gradient background whose light follows the pointer, with an optional pattern layered on top — a grid of dots, a net, diagonal lines or diamonds — that can also drift slowly in a loop. Use it on sections and large containers.

note

Needs the Gradient background module turned on in Animation settings first.

The gradient paints outward from a focus point that eases toward wherever the pointer currently is, and stays wherever the pointer last was once it leaves. It starts centred.

See it live: Gradient background animations on fancyanimations.com.

Settings​

SettingEffect
Gradient backgroundTurns the effect on (required for everything else)
PatternNone, net, dots, diagonal lines, or diamonds
Animate patternMakes the chosen pattern slowly drift in a loop

Only one pattern per element — the pattern itself is drawn behind the element's content.

Variables you can set​

VariableDefaultControls
Background colour#1F1F33The outer gradient colour
Focus colour#2D2D76The colour at the pointer's position
Gradient size60vwThe radius of the gradient
Pattern colour#ffffffColour of the pattern lines/dots
Pattern size30pxThe size of each pattern cell
Pattern opacity0.1How visible the pattern is (0–1)
Dot size1pxRadius of each dot (dots pattern only)
Drift X / Drift Y100%, 100%How far the pattern drifts per loop (0%, 100% or -100%)
Drift duration20sHow long one drift loop takes

Available on Section, Container, Block and Div elements: Style tab → Gradient background animations. All the variables above are native colour/size/number controls in the same panel.

The gradient background panel in Bricks The gradient background panel in Bricks.

Video walkthrough​

Recorded with Fancy Animations 2.8.0 (August 2025). The panel looks different today; the idea it explains still applies.

Common problems​

  • The gradient doesn't show at all. The element already has its own background colour, image or gradient set elsewhere, which overrides the plugin's background entirely. Remove it and use the Background/Focus colour variables instead.
  • The pattern is missing, or your own ::before decoration on the same element breaks. Both the pattern and a lot of decorative techniques use the element's ::before pseudo-element — move your own decoration to a child element instead.
  • The element now stacks oddly above or below its neighbours. Turning this on sets position: relative; z-index: 1 on the element. Set whatever z-index you actually need explicitly.
  • The pattern is too strong, or invisible. Default opacity is 0.1 and the default pattern colour is white — on a light background, set the pattern colour dark instead.