Animation

Border Glow

Cursor-tracked glowing border card. A cone of light follows the pointer along the perimeter, brightening as the cursor approaches an edge. Optional [animated] mode plays a one-shot sweep on mount.

Angular adaptation of an effect by David Haz / reactbits.dev.

Import

import { WrBorderGlow } from 'ngwr/border-glow';

Playground

Hover me

The border lights up where the cursor is.

<wr-border-glow
  [borderRadius]="28"
  [glowRadius]="40"
  [coneSpread]="25"
  [glowIntensity]="1"
  [animated]="false"
>

</wr-border-glow>

Customize

Border Radius (px)
28 px
Glow Radius (px)
40 px
Cone Spread (%)
25 %
Glow Intensity
1.0
Animated
Glow Color

API

NameDescriptionTypeDefault
backgroundColorCard background fill.stringtheme surface token
borderRadiusCorner radius in pixels.number28
glowRadiusHalo extent in pixels — how far the outer glow reaches past the card edge.number40
glowIntensityHalo opacity multiplier (1 = full strength).number1
coneSpreadWidth of the lit cone as a percentage of the perimeter.number25
edgeSensitivityHow sharply the halo fades as the cursor leaves the edge. Lower = wider falloff.number30
fillOpacityStrength of the soft-light interior fill near edges (0..1).number0.5
glowColorHalo colour as "H S L" (HSL parts, no commas).stringtheme-aware (deep amber on light, pale on dark)
colorsMesh-gradient palette for the visible border slice.readonly string[]['#c084fc', '#f472b6', '#38bdf8']
animatedPlay a one-shot perimeter sweep on mount, then fade out.booleanfalse