Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Gooey Search Input, animated React component

A search pill whose icon pinches off into its own bubble through an SVG goo filter when you open it, while the field grows with a springy overshoot. Pass suggestions and the matches drip out of the underside of the field through the same goo, with arrow-key navigation.

  • Free
  • Motion Effects
  • Spring

Pops open, switches off on close and taps when you pick a suggestion. Sound is off on this site until you switch it on.

Types with a key click for every character, in sync with the text. The click stays off until you switch it on.

Like Gooey Search Input? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Gooey Search Input stays free.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

    Props

    PropTypeDefaultWhat it does
    placeholder"Type to search..."Placeholder of the open field.
    collapsedLabel"Search"Label on the collapsed pill.
    collapsedWidth115Width of the pill while collapsed, in px.
    expandedWidth200Width of the open field, in px.
    expandedOffset56Room left of the open field for the icon bubble, in px.
    gooeyBlur5Blur of the goo filter; higher melts the shapes together more.
    suggestions—Words to suggest; up to four matches drip out below while typing.
    onSelect—Called when a suggestion is picked with a click or Enter.
    value—Controlled value.
    defaultValue""Initial value when uncontrolled.
    onValueChange—Called when the text changes (and with "" when the field closes).
    onOpenChange—Called when the field opens or closes.
    autoplayfalseOpens, types a query and closes on a loop until someone touches it.
    disabledfalseDims the pill and ignores input.
    enableSoundtruePlays interface sounds on interaction. They follow the sound switch (setSoundsEnabled, on by default) and stay silent on hover. Autoplay makes the same sounds once the visitor has used the page. Pass false to silence this component.

    Add it to your project

    1. 1

      Set up your project once

      You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

      npx shadcn@latest init -d

      Starting from nothing? The Quick Start walks through the whole thing.

    2. 2

      Connect the registry

      Run this once per project. It writes the Nexus UI entry into components.json for you:

      npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

      Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

    1. 3

      Add the component

      Run this from your project root. It adds the component, the helpers it imports and its npm packages.

      npx shadcn@latest add @nexus-labs/gooey-input
    2. 4

      Check what was added

      With a project made as in the Quick Start (a src/ folder), these files land in it:

      components/
      gooey-input.tsx
      gooey-input/
      gooey-input.tsx
      index.ts
    3. 5

      Copying by hand? Skip the registry

      Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

      npm install framer-motion

      Then show the source and create each file at the path it gives:

    4. 6

      Use it in a page

      Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

      // src/app/page.tsx
      import { GooeyInput } from "@/components/gooey-input";
      
      export default function Page() {
        return (
          <main>
            <GooeyInput />
          </main>
        );
      }

    Like Gooey Search Input? 256 more are in Pro.

    Pro unlocks all 256 Pro components, every template and block, and everything we release next. Gooey Search Input stays free.

    About Gooey Search Input

    The Gooey Search Input expands into a suggestion panel with a gooey morphing animation powered by SVG feMerge filter compositing. The input field and suggestion list share the gooey filter group, causing their edges to merge organically when the suggestion panel appears. Spring physics govern the expand and collapse transitions. A memorable interaction pattern that signals creative, high-craft product development for developer tools and creative platforms.

    Good for

    • Site-wide and product search bars
    • AI and command search inputs
    • Creative tool search interfaces
    • Developer tool query inputs

    Gooey Search Input questions

    How do I install the gooey search input?

    Run `npx shadcn@latest add @nexus-labs/gooey-input`. Note that the registry name is `gooey-input`, not the page slug. It installs framer-motion and lucide-react.

    Can I use it as a controlled input?

    Yes. Pass `value` with `onValueChange`, or use `defaultValue` for uncontrolled mode. `onOpenChange` tells you when it expands or collapses.

    When does it collapse again?

    It collapses on blur when the field is empty, and Esc blurs it. The text is cleared when it collapses.

    How do I change its size and the goo strength?

    `collapsedWidth` (115), `expandedWidth` (200) and `expandedOffset` (56) are in pixels, and `gooeyBlur` (5) sets the SVG blur that merges the shapes. It shows a dark pill in light mode and a white pill in dark mode.

    Does it make sound, and how do I turn it off?

    Pops open, switches off on close and taps when you pick a suggestion. Sounds are synthesised with the Web Audio API, so there are no audio files, and they only play after a click or key press. Pass `enableSound={false}` to silence this component, or call `setSoundsEnabled(false)` from `@/lib/ui-sounds` to switch every sound off at once. The CLI installs `@/lib/ui-sounds` with the component.

    Guides