Energy Burst
A white-hot core with filaments of light branching out in every direction, half charged and breathing. Every few seconds it discharges: the filaments flare, and a tendril arcs across the page into a link or button, which lights up as it lands.
Included with membership
Members install Energy Burst with one command and get the full source, the usage code and the Framer remix, licensed for client work. One membership covers the whole library and the CLI.
When to use it
A hero with a few links worth pointing at: an event, a launch, a lineup. It fills the box you give it and strikes clickable things anywhere on screen, so it suits a page with a handful of them rather than a dense menu. Use one a page.
- Style data-burst-hit on what it strikes, so the page answers the spark. For a smooth page, draw each glow once and fade it in with opacity rather than animating a shadow, which repaints every frame.
- Use onStrike to make the strike mean something: pick the next act, the featured product or the next photo.
- Narrow what it may strike with targets, or wrap parts of the page in data-burst-ignore. It only strikes things on screen and at least a little way from its core.
- Give it a dark ground. The light is added up over what is behind it, so it glows on dark and washes out on light.
Avoid:
- Do not hang anything essential on onStrike. Under reduced motion there are no discharges, so it never fires.
- Do not put two on one page. Each draws a scene of its own, and the tendrils share one canvas over the whole screen.
Props
A white-hot core with filaments of light branching out in every direction, each a bundle of fine hairs. It sits half charged, breathing. Every few seconds it discharges: the whole burst lights out to its tips, the filaments facing a link or button flare and lean towards it, and a tendril arcs across the page into it, which lights up as it lands.
<EnergyBurst />
The burst, which fills its box, and the tendrils it sends across the page. Give the box a size with className or style.
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | Shown over the burst. |
every | [number, number] | [2.5, 5] | Seconds between discharges, picked at random in this range. |
targets | string | — | What a tendril may strike. Default: links, buttons and anything marked `data-burst-target`. Nothing inside `data-burst-ignore` is struck. |
charge | number | 0.75 | How charged it sits between discharges, from 0 to 1: how far out the filaments are lit. |
palette | Partial<EnergyBurstPalette> | — | Colours for the core, the filaments and the glow, over the defaults in `ENERGY_BURST_PALETTE`. |
seed | number | 1 | How the filaments grow: the same number gives the same burst. Read once. |
onStrike | (element: Element) => void | — | Called as a tendril lands. The element also carries `data-burst-hit` for a moment, to style. For a smooth page, fade in a glow drawn once, with opacity, rather than animating a shadow, which repaints every frame. |
className | string | — | Class for the box the burst fills. Give it a size. |
style | React.CSSProperties | — | Inline styles for the box the burst fills. |
<EnergyBurstPalette />
typeThe colours palette sets. ENERGY_BURST_PALETTE holds the defaults, so pass only the ones you change.
| Prop | Type | Default | Description |
|---|---|---|---|
core* | string | — | The white-hot core, and the hairs where they leave it. |
filament* | string | — | The filaments, strongest on the side that runs hot. |
glow* | string | — | The glow round them, and the tips far out. |