Components

Search-Expand Navigation Bar

Click the search icon and the bar becomes a field, then the box grows upward into a card of recent searches. Hit to replay every step in reverse. Click the avatar for an account dropdown. Two open effects: travel (the icon glides right → left) or flip (the home icon rises and blurs into the search icon while the rest blur away).

Effect: travel · Last search: none

Install

npx moumenlab add search-expand-nav

For AI

Open .md

Usage

"use client";

import SearchExpandNav from "./search-expand-nav";

export default function SearchExpandNavExample() {
  return (
    <div className="flex flex-col items-center gap-16 pt-24">
      {/* Default "travel" effect: the search icon glides right → left. */}
      <SearchExpandNav onSearch={(query) => console.log("search", query)} user="Ada Lovelace" handle="@ada" />

      {/* "flip" effect: the first icon rises + blurs into the search icon. */}
      <SearchExpandNav effect="flip" />
    </div>
  );
}