Kinetic UI
Back to Introduction
Interactive

Soft Body Jelly

A drag-and-drop component that deforms and jiggles using complex SVG path manipulation and physics.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add soft-body-jelly
Soft Body Jelly

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.

Drag Me

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>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.