Ballmac UI home

Beams Background

Hairline rails with thin light beams rising along them and dissolving near the top, over a soft glow. Canvas, token colors, DPR aware, pauses off-screen, a still frame under reduced motion.

Private beta

Join the waitlist.

We're letting teams in every week. Leave your email and we'll save you a seat.

2,400+ teams already waiting

Installation

$ pnpm dlx shadcn@latest add @ballmac/beams-background

Usage

import { BeamsBackground } from "@/components/ballmac/beams-background"

The full example is in the Code tab above.

Examples

Falling, single color

Ingest

1.2M events a second.

API reference

PropTypeDefault
gap

Distance between the hairline rails in pixels. Beams travel along the rails.

number36
density

Beams in flight per 1000 px of width.

number30
colors

Beam colors: CSS variable names ("--chart-1") or any CSS colors. Each beam picks one.

string[]["--chart-1", "--chart-2", "--chart-4"]
direction

Which way the beams travel.

"up" | "down""up"
speed

Speed multiplier. 1 is a calm rise.

number1
railOpacity

Opacity of the resting hairline rails (0–1).

number0.07
glow

Add a soft glow where the beams are born.

booleantrue

Also accepts the standard attributes of its root element.

Use with AI

Place <BeamsBackground /> as the first child of a relative, overflow-hidden section; it fills it (absolute inset-0, aria-hidden, pointer-events-none). Content goes after it; the rails fade out at the top and bottom edges. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Beams Background (@ballmac/beams-background) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Waitlist, sign-up or launch sections with centered content
  • Hero backgrounds for developer tools, infrastructure or AI products

Not for

  • Behind long text or tables
  • Pages that already have another animated background

Registry JSON: https://ui.ballmac.com/r/beams-background.json

Credits

Free to use in personal and commercial projects.

npm
None