---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Account menu

The signed-in person's menu, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `AccountMenu`.

## When to use

- The signed-in person's menu.

## Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Account menu on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-account-menu.json --yes
```

```text
Add the Goop Account menu to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
import {
  AccountMenu,
  AccountMenuColorMode,
  AccountMenuContent,
  AccountMenuHeader,
  AccountMenuShortcut,
  AccountMenuSignOut,
  AccountMenuTrigger,
} from '@/components/ui/goop/account-menu';
import { DropdownMenuItem } from '@/components/ui/goop/dropdown-menu';

function RailAccount({ onSignOut }: { onSignOut: () => void }) {
  return (
    <AccountMenu>
      <AccountMenuTrigger variant="avatar" name="Anh Trinh" email="anh@fieldwork.test" hue="green" />
      <AccountMenuContent>
        <AccountMenuHeader />
        <DropdownMenuItem icon="tabler-outline:user">Profile</DropdownMenuItem>
        <DropdownMenuItem icon="tabler-outline:settings">
          Settings
          <AccountMenuShortcut>⌘,</AccountMenuShortcut>
        </DropdownMenuItem>
        <AccountMenuColorMode />
        <AccountMenuSignOut onSelect={onSignOut} />
      </AccountMenuContent>
    </AccountMenu>
  );
}
```

- Fits: account (its recipe); frame: sidebar-foot.
- Also known as: UserMenu, ProfileMenu, AvatarMenu, NavUser, AccountDropdown.
- Inside: AccountMenuHeader, a few DropdownMenuItems (Profile, Settings with an AccountMenuShortcut), AccountMenuColorMode, AccountMenuSignOut last. Never a hand-made light/dark switch beside it.
- height, width, padding, gap, corner, background, text, motion: add no class for these.

## API reference

### Options

- `open?: boolean` — The menu open, held by the caller (with `onOpenChange`).
- `defaultOpen?: boolean` — Open when it first draws.
- `onOpenChange?: (open: boolean) => void` — Called as the menu opens and closes.
- `modal?: boolean` — Whether the rest of the page is shut off while the menu is open (the menu's own default, `true`).
- `children?: ComponentProps<typeof DropdownMenu>['children']` — An `AccountMenuTrigger`, then an `AccountMenuContent`.

- State: open (open / defaultOpen / onOpenChange); drawn by data-focus-visible, data-state=open, data-highlighted, data-disabled

### Parts

- `AccountMenuTrigger` — The button that opens the account menu; its props: account-menu--trigger.md
- `AccountMenuContent` — The menu the trigger opens (`role="menu"`, named "Account"), the theme's menu panel, 220 px wide; also takes container?: HTMLElement | null
- `AccountMenuHeader` — Who is signed in, the menu's first block and no row (the keys and the pointer pass it by)
- `AccountMenuColorMode` — The light/dark choice in the menu; its props: account-menu--color-mode.md
- `AccountMenuSignOut` — The menu's last row, under a line of its own; its props: account-menu--sign-out.md
- `AccountMenuShortcut` — A row's key hint

### AccountMenuColorMode

The light/dark choice in the menu.

```tsx
import { AccountMenuColorMode } from '@/components/ui/goop/account-menu';
```

### Options

- aria-label?: string — The group's name: "Appearance" when left out.
- words?: ColorModeWords — The rows' words, each replaceable.
- value?: ColorModeChoice — The choice, held by the caller (with `onValueChange`); left out, the page's own.
- onValueChange?: (value: ColorModeChoice) => void — Called with the row picked; the page's mode changes only when the rows are left to the page.
- Types: ColorModeWords = { system?: string; light?: string; dark?: string }

### AccountMenuSignOut

The menu's last row, under a line of its own.

```tsx
import { AccountMenuSignOut } from '@/components/ui/goop/account-menu';
```

### Options

- icon?: IconName — The pack icon before the words: the second pack's `tabler-outline:logout` when left out.
- variant?: 'default' | 'destructive' = 'default' — `destructive`: the row in the theme's red, as a red menu row is drawn (for a sign-out that also ends every other session); `default` (left out) the plain row.
- Also takes: onSelect?: (event: Event) => void; disabled?: boolean; asChild?: boolean

### AccountMenuTrigger

The button that opens the account menu.

```tsx
import { AccountMenuTrigger } from '@/components/ui/goop/account-menu';
```

### Options

- name: string — Their name: the row trigger's first line, the header's, and the avatar trigger's name ("Account: <name>").
- email?: string — Their email, under the name in the row trigger and the header.
- initials?: string — One or two letters in the avatar; left out, the name's first letters ("Teodora Valk" → "TV").
- image?: string — The address of their picture, drawn over the initials once it has loaded.
- hue?: 'blue' | 'green' | 'orange' | 'pink' | 'red' | 'yellow' | 'neutral' — One of the six hue words for the avatar (or `neutral`, the grey), readable in light and dark; left out, the colour taken from the name, the same as any avatar given that name.
- fill?: string — The avatar's own colour, any CSS colour, instead of a `hue`; its initials stay light.
- variant?: 'row' | 'avatar' = 'row' — `row` (the default): a full-width 44 px row for a sidebar panel's foot — the avatar, the name over the email, a chevron.
- Also takes: type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean

## Keyboard

- Enter: on the trigger: open, the first row active
- Space: on the trigger: open, the first row active
- ArrowDown: on the trigger: open, the first row active
- ArrowUp: on the trigger: open, the last row active
- ArrowDown / ArrowUp: move the active row, looping past either end
- Home / End: first or last row
- Enter: pick the active row and close (a colour row keeps the menu open)
- Escape: close, the focus back on the trigger
- Tab: close

## Accessibility

- The behaviour layer under the part answers keys, focus and dismissal: never write your own.
- focus-visible: the attribute data-focus-visible
- expanded: the attribute data-state=open
- open: the attribute data-state=open
- highlighted: the attribute data-highlighted
- disabled: the attribute data-disabled

## Motion

- The part sets its own motion: add no transition or animation of your own.

## Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

Shortened to fit: the data-slot values.

## Related

- [Dropdown menu](/themes/meadow/components/dropdown-menu): A menu of actions opened from its button.
- [Workspace switcher](/themes/meadow/components/workspace-switcher): The menu that shows the current workspace and switches to another or creates one.
- [Notification center](/themes/meadow/components/notification-center): A bell button with an unread count that opens a panel of notifications.
- [Toast](/themes/meadow/components/toast): A short notice at a corner of the app that confirms an action and goes by itself, with an optional action such as Undo.
