Pulsing Border

Installation

npm i @paper-design/shaders-react

Code

import { PulsingBorder } from '@paper-design/shaders-react';

<PulsingBorder
  style={{ height: 500 }}
  colorBack="#000000"
  roundness={0.25}
  thickness={0.2}
  softness={0.75}
  intensity={0.2}
  bloom={0.45}
  spots={3}
  spotSize={0.4}
  pulse={0.5}
  smoke={0.35}
  smokeSize={0.6}
  scale={0.6}
  rotation={0}
  offsetX={0}
  offsetY={0}
  speed={1}
  colors={["#cc3333","#cc9933","#99cc33"]}
/>

Props

NameDescriptionTypeValues
colorBackBackground colorstringHex, RGB, or HSL color
colorsUp to 5 colorsstring[]Hex, RGB, or HSL color
roundnessThe border radiusnumber0 to 1
thicknessThe border base widthnumber0 to 1
softnessBorder edge sharpness (0 = hard edge, 1 = smooth gradient)number0 to 1
intensityThickness of individual color spotsnumber0 to 1
bloomThe power of glow (0 = normal color blending, 1 = fully additive blending)number0 to 1
spotsNumber of spots added for each colornumber1 to 20 (integer)
spotSizeAngular size of spotsnumber0 to 1
pulseOptional pulsing animationnumber0 to 1
smokeOptional noisy shape extending the border widthnumber0 to 1
smokeSizeThe size of the smoke effectnumber0 to 1
scaleOverall zoom level of the graphicsnumber0.01 to 1
rotationOverall rotation angle of the graphicsnumber0 to 360
offsetXHorizontal offset of the graphics centernumber-1 to 1
offsetYVertical offset of the graphics centernumber-1 to 1
speedAnimation speednumber0 to 2

Description

Luminous trails of color merging into a glowing gradient frame