GodUI

Light Rays

Volumetric god-rays that slowly sweep and breathe, with optional film grain. Pure CSS.

A soft fan of volumetric light rays beams down from above, slowly sweeping and breathing in intensity, finished with a layer of film grain. Cinematic and warm — the spotlight-from-the-heavens hero. Pure CSS. Drop it as the first child of a relative overflow-hidden container.

Step into the light

God-rays that gently breathe.

Installation

pnpm dlx shadcn@latest add "https://godui.design/r/light-rays.json"

Usage

tsx
 
import { LightRays } from "@/components/godui/light-rays";

<div className="relative overflow-hidden">
  <LightRays />
  <YourContent />
</div>

The layer is absolute inset-0 z-base; parent must be relative overflow-hidden, content at z-raised+. Color defaults to --color-primary. The sweep stops under prefers-reduced-motion; the static fan remains.

Examples

Warm

Props

PropTypeDefaultDescription
rayCountnumber14Number of rays in the fan.
colorstring--color-primaryRay color.
speednumber1Sweep speed multiplier.
anglenumber0Base angle (deg) the fan points from.
intensitynumber0.6Overall ray opacity, 01.
grainnumber0.05Film-grain amount, 01 (0 disables it).

Also accepts standard div attributes (e.g. className, style).

On this page

Built with GodUI

Beautifully crafted motion components for modern interfaces.

Star on GitHub