Components

Lightning Button

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-button

Colors (move cursor near a button)

Variants

Bolt count & radius

Shape

Press effects (click each)

Props Configuration

PropTypeDefaultDescription
childrenReactNode-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`.
coreColorstring"#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.
cutbooleantrueApplies a diagonal bottom-right corner cut.
cornerSizenumber16Depth of the corner cut in pixels (ignored when `cut` is false).
radiusnumber150Distance in pixels from the button edge within which the cursor triggers the lightning tendrils.
boltCountnumber5Number of lightning tendrils connecting the button border to the cursor.
segmentsnumber7Number of segments per bolt — higher values produce a more jagged path.
jitternumber16Maximum perpendicular displacement of each bolt segment, in pixels.
thicknessnumber1.4Stroke width of each bolt's bright core, in pixels.
glowIntensity"low" | "medium" | "high""medium"Spread radius of the bolt glow.
flickerSpeednumber60Milliseconds between bolt-shape regenerations — lower values crackle faster.
idleGlowbooleantrueKeeps 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.