Morphing Blob

An ambient, accessible SVG blob background that continuously morphs with spring physics and subtly follows the cursor for a fluid, interactive visual effect.

Installation

Add the component directly to your repository using shadcn CLI:

npx shadcn@latest add Surajmaurya1/easyui/morphing-blob

API Reference

PropTypeDefaultDescription
widthnumber400Width of the SVG viewport in pixels
heightnumber400Height of the SVG viewport in pixels
pointsnumber8Number of anchor points used to construct the blob shape
baseRadiusnumber120Resting radius of the blob in pixels
variancenumber28Maximum radius variation applied to each anchor point during morphing
speednumber0.7Controls how frequently new random morph targets are generated
stiffnessnumber45Spring stiffness controlling how strongly anchor points move toward their targets
dampingnumber9Spring damping controlling the resistance and smoothness of the blob motion
cursorFollowbooleantrueEnables or disables cursor-follow interaction
cursorStrengthnumber0.35Controls how strongly the blob moves toward the cursor position
cursorSmoothnessnumber0.08Controls how smoothly the blob catches up to the cursor; lower values create more fluid trailing motion
colors[string, string]['#7C3AED', '#06B6D4']Two colors used for the blob gradient, from start to end
classNamestringundefinedAdditional CSS classes for positioning, sizing, opacity, layering, and other styling