Kinetic UI
Back to Introduction
Navigation

Elastic Sidebar

A navigation menu that physically stretches and pulls like a rubber band using SVG path morphing.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add elastic-sidebar

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 Sidebar

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>
  );
}
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.