Components
A button that spawns crackling lightning tendrils connecting its border to the cursor whenever it's within range. Fully customizable colors, bolt count, jitter, and glow.
npx neonblade add lightning-buttonColors (move cursor near a button)
Variants
Bolt count & radius
Shape
Press effects (click each)
Props Configuration
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Button label content. |
color | "cyan" | "pink" | "green" | string | "cyan" | Accent color — use a preset name or any valid CSS color (e.g. "#ff4400"). |
lightningColor | "cyan" | "pink" | "green" | string | — | Color of the lightning bolts. Falls back to `color`. |
coreColor | string | "#ffffff" | Color of the bright inner core of each bolt. |
size | "xs" | "sm" | "md" | "lg" | "xl" | "md" | Controls padding and font size. |
variant | "solid" | "outline" | "ghost" | "solid" | Visual style of the button. |
cut | boolean | true | Applies a diagonal bottom-right corner cut. |
cornerSize | number | 16 | Depth of the corner cut in pixels (ignored when `cut` is false). |
radius | number | 150 | Distance in pixels from the button edge within which the cursor triggers the lightning tendrils. |
boltCount | number | 5 | Number of lightning tendrils connecting the button border to the cursor. |
segments | number | 7 | Number of segments per bolt — higher values produce a more jagged path. |
jitter | number | 16 | Maximum perpendicular displacement of each bolt segment, in pixels. |
thickness | number | 1.4 | Stroke width of each bolt's bright core, in pixels. |
glowIntensity | "low" | "medium" | "high" | "medium" | Spread radius of the bolt glow. |
flickerSpeed | number | 60 | Milliseconds between bolt-shape regenerations — lower values crackle faster. |
idleGlow | boolean | true | Keeps a subtle ambient glow on the button border at rest. |
pressEffect | "ripple" | "shine" | "mechanical" | "destroy" | "none" | "ripple" | Animation played when the button is pressed/clicked: ripple (expanding ring), shine (one-shot diagonal sweep), mechanical (physical squash + darken), destroy (cracks spread across the button, then it blasts into glowing shards and reforms), or none. |