Kinetic UI
Back to Introduction
Navigation

Elastic Gooey Menu

A full-screen navigation menu that pulls open like stretching rubber before snapping into place with a satisfying bounce.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add elastic-gooey-menu
Elastic Gooey Menu

Elastic Stretchy Menu

Click the menu button in the top right. Watch how the SVG path physically stretches and snaps into place using bezier curve interpolation.

Installation

npx kinetic-ui-cli@latest add elastic-gooey-menu

How It Works

The ElasticGooeyMenu utilizes an advanced technique where a standard HTML <div> is combined with an SVG <path> acting as its leading edge. Using framer-motion, we animate the SVG's d attribute from a deeply curved bezier curve (Q command) into a straight vertical line as the menu slides into view. This creates the optical illusion that the menu is made of stretching rubber.

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { ElasticGooeyMenu } from "@/components/creative/elastic-gooey-menu";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { ElasticGooeyMenu } from "@/components/creative/elastic-gooey-menu";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <ElasticGooeyMenu
        links="example"
      />
    </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.