Light Rays

Shafts of sunlight slanting down through the water, each swaying on its own rhythm. Pure CSS.

no dependenciesMIT · free

Into the blue.

Installation

npx shadcn@latest add https://ombakui.com/r/light-rays.json

Usage

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

<LightRays className="h-[480px] bg-gradient-to-b from-sky-900 to-slate-950" count={10}>
  <h1>Into the blue.</h1>
</LightRays>

Props

PropTypeDefaultDescription
childrenReactNode–Content rendered on top.
colorstring"#bff7ff"Color of the rays.
countnumber9Number of rays, 4–14.
intensitynumber0.5Brightness of the rays, 0–1.
durationnumber9Seconds for one sway; lower is faster.
classNamestring–