Reference

Visual filters.

Opacity and the CSS filter family. Animate visibility, softness, brightness, color saturation, and more without touching the geometry of the element.

The visual properties

PropertyTypeDefaultDescription
opacitynumber 0–11Element transparency. 0 is invisible, 1 is fully visible. The most-used property in any animation library.
blurnumber (px)0Gaussian blur in pixels. Subtle values (1–3px) suggest depth of field; larger values (10+) create dreamy reveals.
brightnessnumber1Brightness multiplier. 0 is black, 1 is natural, values above 1 brighten. 0.5 is half brightness.
contrastnumber1Contrast multiplier. 0 is solid grey, 1 is natural, values above 1 increase contrast.
saturatenumber1Color saturation. 0 is grayscale, 1 is natural, values above 1 oversaturate.
grayscalenumber 0–10Convert to grayscale. 0 is full color, 1 is fully gray. Convenient shortcut over saturate.

How filters compose

When you enable several filter properties on the same animation, Glopzi composes them in a fixed order:

  1. blur
  2. brightness
  3. contrast
  4. saturate
  5. grayscale

Order matters because filters apply on top of each other. Blur followed by brightness produces a different image than brightness followed by blur. Glopzi’s order is the most visually predictable for typical combinations.

Opacity is separate from the filter chain. It applies to the final composited result.

Performance notes

  • Opacity is GPU-accelerated and essentially free at any frame rate.
  • Filters (blur, brightness, etc.) are also composited on GPU but more expensive than transforms. Animating filters on dozens of elements simultaneously can drop frame rate, especially on mobile.
  • Heavy blur values (above ~30px) multiply cost. A 50px blur on a hero image is beautiful; the same on twenty cards is a thermal event.

Tip

For mobile, consider disabling expensive filter animations via breakpoint overrides. The visual loss is small; the battery savings aren’t.

Useful patterns

  • Fade up: opacity 0 to 1 + translate Y 30 to 0. The classic entrance.
  • Color wash on hover: grayscale 1 to 0 with hover trigger. Image goes from black-and-white to full color.
  • Focus blur: blur 8 to 0 + opacity 0 to 1. Image resolves into focus from a misty start.
  • Cinematic dim: brightness 1 to 0.7 on a background image when overlay text appears. Subtle, helps text legibility.

Next steps