Interactive Soft Body Jelly
Drag the blob around. Notice how the SVG path physically deforms and stretches under tension, then snaps back with zero-dependency spring physics.
Installation
npx kinetic-ui-cli@latest add soft-body-jelly
How It Works
Usually, soft-body physics requires heavy WebGL libraries like matter.js or three.js. This component achieves a gelatinous, soft-body effect natively using purely SVG paths and framer-motion. By mapping the drag values (x and y) into a useTransform hook, we mathematically deform the Bezier curve control points (C) of a circle on the fly, creating a 0-dependency, high-performance physical reaction.
Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { SoftBodyJelly } from "@/components/creative/soft-body-jelly";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { SoftBodyJelly } from "@/components/creative/soft-body-jelly";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<SoftBodyJelly
/>
</div>
);
}