Baktiyar Ablaikhan

Gooey Input

Source
Aceternity UI ↗
Author
Aceternity UI
Licence
Aceternity UI licence (free component)

Loading…

A search button melts into an input field through an SVG goo filter.

Code

"use client";

import { GooeyInput } from "@/lab/aceternity/ui/gooey-input";
import { Fit } from "./_fit";

export default function GooeyInputDemo() {
  return (
    <Fit width={420} height={200} max={1.6}>
      <div className="flex h-full w-full items-center justify-center">
        <GooeyInput placeholder="Search..." />
      </div>
    </Fit>
  );
}
Prompt

Build "Gooey Input", a input animation. What it does: A search button melts into an input field through an SVG goo filter. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS, using motion. Technique: the Motion library, inline SVG. It sits on a light background, in a 16:10 frame. Respect prefers-reduced-motion with a still state, pause work when the element is off screen, and keep it accessible. Original: https://ui.aceternity.com/components/gooey-input (Aceternity UI, Aceternity UI licence (free component)).