Skip to main content

Updated: Electric Border

By Steven Van ·

The rebuilt React Bits component adds layered lightning, sparks and a glow, reacts to the cursor and clicks, and now supports light mode.

The React Bits Electric Border component has been rebuilt with layered lightning strands, sparks and a soft glow, and it now works in light mode.

How the effect behaves

The current races around the edge of the element as it powers on. It surges near the cursor and jolts around on click. The component wraps any element in crackling strands of current that leap off in sparks.

Installing it

The component is available in JavaScript or TypeScript, with plain CSS or Tailwind. The TypeScript and Tailwind version installs with npx shadcn@latest add @react-bits/ElectricBorder-TS-TW.

React Bits
React Bits
An open-source collection of 200+ animated, interactive React components and micro-interactions.
View React Bits →
Sources

Original source

Read Updated: Electric Border on Creators Toolbox