Border Glow
Web (React)
An interactive card wrapper with an ambient glowing mesh gradient that mathematically tracks the mouse.
An interactive card wrapper with an ambient glowing mesh gradient that mathematically tracks the mouse. The glow traces the borders exactly and cascades over the inner padding realistically.
Interactive Glow
A highly sensitive ambient glow effect that tracks the cursor mathematically around the border radius.
Installation
CLI
npx @modus-ui/cli add border-glowManual
- Copy the code from the component tab.
- Create a file at
components/ui/border-glow.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
edgeSensitivity | number | 30 | How close in pixels to the edge the glow appears. |
glowColor | string | "266 100 65" | Glow colour as space-separated HSL values. |
backgroundColor | string | "hsl(var(--card))" | Card background colour. |
borderRadius | number | 28 | Corner radius in pixels. |
glowRadius | number | 40 | Size of the glow in pixels. |
glowIntensity | number | 1 | Strength of the glow. |
coneSpread | number | 25 | Angular spread of the glow in degrees. |
animated | boolean | false | Runs an intro sweep of the glow. |
colors | string[] | ["hsl(var(--primary))", "hsl(var(--primary))", "hsl(var(--primary))"] | Colours of the border gradient. |
fillOpacity | number | 0.5 | Opacity of the inner glow fill. |
Comments