Ballmac UI home

Light Rays

Soft beams of theme-colored light fanning down from the top edge, each swaying and breathing at its own pace, deterministic so the server and browser match.

Right-to-left: Rays fan out from a point centred with left-1/2 and a negative margin; both are physical and symmetric, so the picture is the same in either direction.

Let there be light

Soft rays, sway, and nothing else moving.

Installation

$ pnpm dlx shadcn@latest add @ballmac/light-rays

Usage

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

The full example is in the Code tab above.

Examples

Tones and count

chart-2 · 4 rays
chart-3 · 5 rays
chart-4 · 6 rays
foreground · 7 rays

API reference

PropTypeDefault
count

Number of rays.

number7
tone

Color of the light.

RayTone"chart-1"
spread

How far the rays fan out, in degrees from one edge to the other.

number70
intensity

Brightness from 0 to 1.

number0.55
duration

Seconds for a ray to sway once. Longer is calmer.

number9

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Screen readersDecorative: aria-hidden and pointer-events-none
Reduced motionThe rays are still

Use with AI

<LightRays count tone spread intensity duration /> inside a relative, overflow-hidden parent. Tone is a theme token, so it follows any palette. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Light Rays (@ballmac/light-rays) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Hero and pricing sections that want warmth
  • Behind modals and announcement bars

Not for

  • Light backgrounds with dark text at high intensity

Registry JSON: https://ui.ballmac.com/r/light-rays.json

Credits

Free to use in personal and commercial projects.

Registry
shadcn/utils