Pulsing Border draws a glowing, animated border around a rounded rectangle. Up to 5 colors each produce independent luminous spots that orbit the border perimeter. A bloom parameter controls whether the spots blend normally or additively (creating a stronger glow), and optional smoke and pulse effects add further visual depth.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/paper-design/shaders/llms.txt
Use this file to discover all available pages before exploring further.
Usage
- React
- Vanilla JS
Props
Background color. Accepts any CSS color string, including transparent (
#00000000).Array of CSS color strings, one per color spot group. Accepts up to 5 colors.
Corner radius of the border rectangle.
0 gives sharp corners; 1 gives a fully rounded shape. Range 0 to 1.Base width of the border. Range
0 to 1.Edge sharpness of the border.
0 gives a hard edge; 1 gives a soft, wide glow. Range 0 to 1.Thickness of individual color spots relative to the border. Range
0 to 1.Blend mode for color spots.
0 uses normal (over) blending; 1 uses additive blending for a stronger glow. Range 0 to 1.Number of spots added for each color. Range
1 to 20.Angular size of each color spot along the perimeter. Range
0 to 1.Intensity of a heartbeat-like pulsing animation.
0 disables the pulse. Range 0 to 1.Intensity of a noisy shape that extends the border inward and outward. Range
0 to 1.Scale of the smoke noise pattern. Range
0 to 1.Controls the aspect ratio of the border shape.
auto— the border shape matches the canvas aspect ratiosquare— the border shape is always square (useful for circular borders when combined withroundness: 1)
Shorthand to set equal margins on all four sides. When set, overrides individual
marginLeft, marginRight, marginTop, and marginBottom values.Distance from the left canvas edge to the border shape. Range
0 to 1.Distance from the right canvas edge to the border shape. Range
0 to 1.Distance from the top canvas edge to the border shape. Range
0 to 1.Distance from the bottom canvas edge to the border shape. Range
0 to 1.Animation speed multiplier. Set to
0 to pause.Starting animation frame in milliseconds.
Presets
| Name | Description |
|---|---|
defaultPreset | Three-color cyan/magenta/red border with moderate roundness and pulse. |
circlePreset | Fully round border in square aspect ratio, creating a glowing circle. |
northernLightsPreset | Five-color aurora palette with very slow speed and full-screen thickness. |
solidLinePreset | Single-color solid hairline border with no pulse or smoke. |
@paper-design/shaders-react:
Sizing props
Pulsing Border also accepts allShaderSizingParams (fit, scale, rotation, offsetX, offsetY, originX, originY, worldWidth, worldHeight). See Sizing and fit for details.