Introducing Magic UI Pro - 50+ blocks and templates to build beautiful landing pages in minutes.

19.0k
208

Light Rays

PreviousNext

A component with animated light rays which shine down from above.

Installation

pnpm dlx shadcn@latest add @magicui/light-rays

Usage

import { LightRays } from "@/components/ui/light-rays"
<div className="relative h-[400px] w-full overflow-hidden rounded-xl border">
  <LightRays />
</div>

Props

PropTypeDefaultDescription
countnumber7Total number of animated rays.
colorstring"rgba(160, 210, 255, 0.2)"Base colour used for the gradients.
blurnumber36Pixel radius applied to the blur filter.
opacitynumber0.65Maximum opacity that rays reach (0 – 1).
speednumber14Average seconds each ray takes to complete a cycle.
lengthstring | number"70vh"CSS length for the ray height.
classNamestringundefinedAdditional class names applied to the wrapper.
styleReact.CSSPropertiesundefinedInline styles merged into the wrapper.