Dark Section
Notice how the divider fluidly animates its path to create an organic connection to the next section.
Light Section
The morphing divider bridges the gap seamlessly.
Installation
npx kinetic-ui-cli@latest add morphing-divider
How It Works
Instead of a static SVG divider, we supply an array of different SVG path data strings that share the same anchor points (e.g., corners are pinned to the bottom left/right).
We use a simple setInterval to cycle through the paths, and Framer Motion handles the complex path tweening/interpolation automatically using the animate={{ d: currentPath }} property.
Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { MorphingDivider } from "@/components/creative/morphing-divider";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { MorphingDivider } from "@/components/creative/morphing-divider";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<MorphingDivider
fill="example"
/>
</div>
);
}