Browse components
Lightning
A crackling procedural lightning bolt with forking branches, strobing strikes and storm clouds lit from within. WebGL.
Lightning
Installation
npx shadcn@latest add @glint-ui/lightningFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glint-ui-seven.vercel.app/r/lightning.json
Usage
import { Lightning } from "@/components/ui/lightning";
<div className="relative h-96">
<Lightning hue={230} />
</div>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| hue | number | 230 | Bolt hue in degrees. |
| speed | number | 1 | Animation speed multiplier. |
| intensity | number | 1 | Bolt and flash brightness. |
| size | number | 1 | Bolt scale; larger zooms in. |
| xOffset | number | 0 | Horizontal position, -1 left to 1 right. |
| interval | number | 2.4 | Seconds between strikes. |
| className | string | — | Extra classes for the root element. |