An advanced off-canvas navigation menu that uses Framer Motion's spring physics to animate SVG cubic bezier curves. When opened, the edge of the sidebar pulls elastically outwards before snapping into a perfectly straight line, providing an incredibly tactile feel.
Live Preview
Elastic Navigation
Click the menu button in the top right to see the elastic SVG morphing animation.
Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { ElasticSidebar } from "@/components/creative/elastic-sidebar";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { ElasticSidebar } from "@/components/creative/elastic-sidebar";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<ElasticSidebar
items{/* value */}
/>
</div>
);
}