God Rays

Soft shafts of light falling through haze from a high window.

Still frame of God Rays: soft shafts of light falling through haze from a high window
Still frame

Installation

pnpm dlx shadcn@latest add @gradients-pro/god-rays

Needs a Pro account and the Pro registry setup.

Usage

import { GodRays } from "@/components/god-rays";

<GodRays className="h-[560px]">{children}</GodRays>;

It fills its box, so give it a height. Children render on top.

Props

PropTypeDefaultDescription
palette"cathedral", "canopy", "ultramarine""cathedral"One of the curated palettes.
appearance"auto", "dark", "light""auto"Which version of the palette to use. auto follows a dark or light class (or data-theme) on <html>, then the OS setting.
colorsstring[]palette2 to 6 CSS colours, var(--x) included. Replaces the palette's colours.
backgroundstringpaletteReplaces the palette's background.
raysnumber0.550 to 1. Shaft contrast: low is a soft wash, high is crisp beams.
densitynumber10.25 to 4. More, narrower shafts.
softnessnumber0.450 to 1. Longer, softer shafts that reach further before fading.
grainnumber0.140 to 1. Film grain.
speednumber0.60 to 2. How fast it moves; 0 holds a still frame.
paramsPartial<GradientParams>noneAny other engine param, applied last.
classNamestringnoneClasses for the outer box. Give it a size, for example h-[560px].
styleCSSPropertiesnoneInline styles for the outer box.
childrenReactNodenoneContent drawn above the background.