Rendyn

Component library

189 components

Product blocks

Morphing Search

Morphing Search filters supplied items and reports query and selection events.

Interactive exampleReact Tailwind CSS

Practical React example

Search a small known set of records from a compact expandable field.

Before you copy and paste

Keep the example in the React rendering environment required by the imported component. Copy components/motion/morphing-search.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: clsx, lucide-react, motion, react, react-dom, tailwind-merge.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Search a small known set of records from a compact expandable field

// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";

import { Blocks, BookOpen, Bot, FolderOpen, Palette } from "lucide-react";
import {
  MorphingSearch,
  type MorphingSearchItem,
} from "@/components/motion/morphing-search";

const ITEMS: MorphingSearchItem[] = [
  {
    id: "project-folder",
    title: "Project Folder",
    description: "Block · Files and previews",
    keywords: ["files", "overlay"],
    icon: FolderOpen,
  },
  {
    id: "motion-components",
    title: "Motion components",
    description: "Collection · Interaction primitives",
    keywords: ["animation", "components"],
    icon: Blocks,
  },
  {
    id: "agent-interfaces",
    title: "Agent interfaces",
    description: "Collection · AI building blocks",
    keywords: ["ai", "chat"],
    icon: Bot,
  },
  {
    id: "installation",
    title: "Installation guide",
    description: "Documentation · Add your first component",
    keywords: ["setup", "shadcn"],
    icon: BookOpen,
  },
  {
    id: "design-tokens",
    title: "Design tokens",
    description: "Documentation · Color, type, and motion",
    keywords: ["theme", "styles"],
    icon: Palette,
  },
];

export function MorphingSearchPreview() {
  return (
    <div className="flex w-full max-w-[22rem] items-center gap-3">
      <MorphingSearch items={ITEMS} placeholder="Find components" />
      <MorphingSearch
        items={ITEMS}
        placeholder="Find components"
        shortcut=""
        iconOnly
      />
    </div>
  );
}

Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.

Use stable item IDs and provide meaningful empty-result text. For remote search, own debouncing, cancellation and response ordering outside the visual component.

Customization

MorphingSearchProps.items
Required; MorphingSearchItem[].
MorphingSearchProps.placeholder
Optional; string.
MorphingSearchProps.shortcut
Optional; string.
MorphingSearchProps.iconOnly
Optional; boolean. Render the closed trigger as a compact search icon.
MorphingSearchProps.emptyMessage
Optional; string.
MorphingSearchProps.open
Optional; boolean.
MorphingSearchProps.defaultOpen
Optional; boolean.
MorphingSearchProps.onOpenChange
Optional; (open: boolean) => void.
MorphingSearchProps.onQueryChange
Optional; (query: string) => void.
MorphingSearchProps.onSelect
Optional; (item: MorphingSearchItem) => void.
MorphingSearchProps.className
Optional; string.

Integration notes

  • A display query is not a safe database query; validate and parameterize requests in the backend.
  • Keep the selected result associated with the latest query when responses arrive out of order.

Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP