Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-account-menu.json --yes

Account menu

Pro

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

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.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-account-menu.json --yes
PROMPT
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
OptionTypeWhat it does
open?booleanThe menu open, held by the caller (with onOpenChange).
defaultOpen?booleanOpen when it first draws.
onOpenChange?(open: boolean) => voidCalled as the menu opens and closes.
modal?booleanWhether 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
PartWhat it is
AccountMenuTriggerThe button that opens the account menu; its props: account-menu--trigger.md
AccountMenuContentThe menu the trigger opens (role="menu", named "Account"), the theme's menu panel, 220 px wide; also takes container?: HTMLElement | null
AccountMenuHeaderWho is signed in, the menu's first block and no row (the keys and the pointer pass it by)
AccountMenuColorModeThe light/dark choice in the menu; its props: account-menu--color-mode.md
AccountMenuSignOutThe menu's last row, under a line of its own; its props: account-menu--sign-out.md
AccountMenuShortcutA 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

KeyWhat it does
EnterOn the trigger: open, the first row active
SpaceOn the trigger: open, the first row active
ArrowDownOn the trigger: open, the first row active
ArrowUpOn the trigger: open, the last row active
ArrowDown ArrowUpMove the active row, looping past either end
Home EndFirst or last row
EnterPick the active row and close (a colour row keeps the menu open)
EscapeClose, the focus back on the trigger
TabClose

Accessibility

  • The behaviour layer under the part answers keys, focus and dismissal: never write your own.

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
focus-visiblethe attribute data-focus-visible
expandedthe attribute data-state=open
openthe attribute data-state=open
highlightedthe attribute data-highlighted
disabledthe 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.

goop.so/themes/meadow/components/account-menu.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-account-menu.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.