kuratlielia

User Menu

Component 93

About

An avatar-triggered account menu with an identity header, account links, inline theme and status switches, and sign out, that collapses into a bottom sheet on phones.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds User Menu to your project and fits it to your theme.

Code

How User Menu is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import UserMenu from "@/components/ui/user-menu";

import { CreditCard, Settings, UserRound } from "lucide-react";

export default function UserMenuDemo() {
  return (
    <div className="flex min-h-[360px] w-full items-center justify-center bg-background p-10 text-foreground">
      <UserMenu
        user={{ name: "Jamie Rivera", email: "jamie@acme.co", plan: "Pro" }}
        showName
        onThemeChange={(theme) => console.log(theme)}
        items={[
          {
            label: "Profile",
            icon: <UserRound size={16} />,
            onSelect: () => {},
          },
          {
            label: "Settings",
            icon: <Settings size={16} />,
            keys: ["⌘", ","],
            onSelect: () => {},
          },
          {
            label: "Billing",
            icon: <CreditCard size={16} />,
            onSelect: () => {},
          },
        ]}
        onSignOut={() => {}}
      />
    </div>
  );
}

Dependencies

More by kuratlielia

View all
  • Activity Heatmap

    Activity Heatmap

    341
  • Image Compare

    Image Compare

    104
  • Date Range Picker

    Date Range Picker

    62
  • Stats Band

    Stats Band

    52
  • Usage Meter

    Usage Meter

    45
  • Signature Pad

    Signature Pad

    37
  • Timeline

    Timeline

    33
  • Card Stack

    Card Stack

    26