Energy Web
v1.0.0Threads of light that branch out from a corner and crackle where the pointer goes, on a dark or light ground. Set the colours, thread count, spread and glow for a hero background. Holds still under reduced motion.
Installation
Run once in your project root to configure paths and dependencies:
npx vectorvesper initDownloads and registers the component in your project:
npx vectorvesper add energy-webIf installing manually or managing your package lock:
npm install @vectorvesper/motion threeUsage
A dark hero for something technical or electric: an AI product, a developer tool, a launch page. On a light background the threads are drawn as ink, so it works on an off-white page too.
Import
Usage
Do
- Move origin to the corner opposite your copy so the threads frame it.
- Lower intensity and core when text sits close to the threads.
Don't
- Do not raise spread and intensity together on a small area; the threads fill it and wash it out.
WebGL — render it on the client only
On Next.js, load it with ssr: false from a Client Component, as below. Vite apps need nothing extra.
prefers-reduced-motion and provides a graceful fallback.Props
Threads of light branch out from a bright core, just past a corner by default, and stream slowly outward. Near the pointer they crackle and a soft glow follows it.
<EnergyWeb />
The threads, with your content laid over them. Fills the area, which is 100svh tall unless you size it.
| Prop | Type | Default | Description |
|---|---|---|---|
color | string | "#8ff5e0" | The colour of the threads. |
accent | string | "#f2f0ea" | The glow that follows the pointer. |
background | string | "#000000" | The colour behind everything. On a light colour the threads are drawn as ink. |
threads | number | 9 | How many main threads go round the core. |
speed | number | 0.35 | How fast the energy streams outward. |
intensity | number | 1.6 | How bright the threads are. |
reach | number | 0.25 | How far the pointer reaches, as a share of the height. |
origin | [number, number] | [0.92, -0.06] | Where the core sits, as fractions of the width and height from the top left. Past an edge, the threads come in from off screen. |
spread | number | 2 | How far the threads reach from the core. |
core | number | 1.6 | How bright the core is. 0 hides it. |
className | string | — | Sizes the area. Without a height it is 100svh tall. |
style | React.CSSProperties | — | Inline styles for the area. A height here wins over the default. |
children | React.ReactNode | — | Content drawn over the energy. |