Light rays

Also called god rays, light beams, or sun rays background

Soft beams of light that fan down from above a section and slowly sway and pulse, like sun through a window, set behind a hero headline.

What is Light rays?

Light rays, also called god rays, are long, faint wedges of light that spread out from a point above the content. Each beam sways a few degrees and brightens and dims on its own slow loop, so the light seems to shift, like sun through leaves or a stage light through haze. They give a launch page or hero a calm sense of reveal.

Each ray is a tall element with a gradient that fades from the light color to transparent, clipped to a narrow wedge with clip-path and softened with filter: blur(). Put the blur on a wrapper and the clip on its child; on one element, the clip would cut off the blur’s soft edges. Rotating the rays around their top point with transform-origin: top and fading their opacity keeps the animation cheap. A WebGL shader can render true volumetric light, but plain elements are enough for most heroes.

Rays need a dark background to read as light, so use them in a dark hero or section. Keep them dim enough that the headline stays the brightest thing on screen, run slow loops of 6 to 12 seconds, and hold the rays still for people who prefer reduced motion.

Often confused with

Aurora background
An aurora is soft ribbons of color drifting across the background. Light rays are straight beams that spread out from one point above the content.
All terms

Aurora background

A background of soft, blurred color ribbons that drift slowly, like the northern lights, used behind hero sections and landing pages.

Glow effect

A soft halo of colored light around a button, card, or text, made with colored shadows or a blurred layer behind the element.

Blur

A softening effect made with CSS filter: blur() on an element itself, or backdrop-filter: blur() on whatever shows through it from behind.

Hero section

The large first section at the top of a landing page, with a headline, a short subhead, a call to action, and a visual.

Build it with Layerwise

Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.