Animated React menus, tabs and navigation

Account menu

A profile pill that morphs into an account card: a status picker that recolours the avatar's dot, quick tiles that lift, a workspace switcher whose check flies, a filling storage meter and a log out that asks twice.

Navigation, press, Motion

Install

npm i clsx motion tailwind-merge && curl -o components/account-menu.tsx https://motion-brew.com/r/account-menu.tsx

One self contained file for React and Tailwind CSS: account-menu.tsx. Or ask your AI agent to add it through the MCP server.

Usage

import { AccountMenu } from "@/components/account-menu";

export default function TopBar() {
  return (
    <AccountMenu
      name={user.name}
      handle={user.handle}
      avatar={user.avatar}
      workspaces={workspaces}
      onWorkspaceChange={(id) => switchWorkspace(id)}
      onSignOut={signOut}
    />
  );
}

Props

PropTypeDefaultDescription
namestring"Jordan Lee"
handlestring"@jordan"Under the name
avatarstringa sample photo
defaultOpenbooleanfalseStart as the card
defaultStatus"online" \"focus" \"away" \"hidden""online"
onStatusChange(status) => void
workspacesAccountWorkspace[]two samplesid, name, plan, color
defaultWorkspacestringthe first
onWorkspaceChange(id) => void
storage[used, total] \null[6.4, 10]GB; null hides the meter
onUpgrade() => void
onProfile, onSettings, onShortcuts, onNewWorkspace() => voidThe tiles and the new workspace row
onSignOut() => voidCalled on the second press
classNamestring

More navigation

  • Liquid tabs: Icon tabs where the chosen tab is a white bump grown out of the panel.
  • Sidebar nav: An app sidebar that folds to a slim rail of icons.
  • Context menu: Right click the card for a menu where every icon animates.
  • Profile menu: A workspace profile menu where every icon has its own micro interaction as you hover its row.

All animated react menus, tabs and navigation