Glow

Bloom around a shape: a soft breathing halo, neon that cools instead of cutting off, a spectrum flowing round the border, or text bloom from a mask.

Generate
<Fx effect="glow" preset="Soft" />

Features

  • Soft, neon, aura (a spectrum flowing round the border) and mask (text bloom) styles.
  • Heat: neon cools and deepens instead of switching off.
  • Breathing on a continuous phase, so speed changes never jump.

Use it for

  • A primary call to action.
  • Hover on cards, as attention.
  • A recording or live indicator.

On this site

Installation

  1. Get runets.
    git clone https://github.com/ziyam-khan/runets
  2. Copy these files into your project, keeping their folders.
  3. Install what they use.
    pnpm add react

Usage

import { Fx } from 'runets'

<div className="card"> {/* position: relative */}
  <Fx effect="glow" />
</div>

API

PropTypeWhat it does
effectstringThe effect’s id, as in the address of this page.
presetstringOne of the presets above; the first by default.
paramsParamsAny parameter from the table, over the preset.
place'under' | 'over'Under the parent’s content (fills, halos) or over it (sparkles, glass). Default under.
radiusnumberCorner radius in points; the parent’s own border radius by default.
backdropstring | PaintWhat glass and distortion read: an image URL, or a function that paints a canvas the size of the parent.
maskPaintAn alpha mask for mask glow and text sheen.
hotbooleanDrives heat: the layer lights in 60 ms and cools over half a second instead of cutting off.
triggernumberChange it to fire a one-shot now (ping, ripple, burst, shockwave, zap).
wakenumberChange it to redraw for a second when something the layer reads, such as its occluders, moves on its own.
shape(time, w, h) => RectThe effect’s shape inside the parent, per frame: a lens that drifts.

Parameters

NameRangeDefault
style Stylesoft, neon, aurasoft
color Colourcolor0x7c5cff
core Hot corecolor0xf4f0ff
third Thirdcolor0x22d3ee
radius Radius1 to 6414
intensity Intensity0 to 31
inner Inner0 to 10
occlusion Occlusion0 to 10.15
breathe Breathe0 to 10.6
breathePeriod Breathe period0.4 to 82.6
heat Heat0 to 11
hot Hot0 to 10.6
auraSpeed Aura speed0 to 10.12
rimWidth Rim width0.2 to 30.6
reach Reach2 to 84.5

Accessibility

Source

The code is in src/fx/glsl/emit.ts in runets, MIT licensed.