# Account menu + profile card

A profile disclosure with consumer-owned identity data, grouped native account links and native action buttons.

Access: pro. Category: Blocks. Kind: composite.

## When to use

- Use it when a page needs a profile disclosure with consumer-owned identity data, grouped native account links and native action buttons.
- Choose it for a settings workflow where saved state, validation, and side effects remain in the host application.

## Alternatives

- Choose empty-state instead when empty collections, search results and errors with a clear next action is the actual interface need, rather than account menu + profile card.

## Setup for agents

Use React 19 and TypeScript. Initialize shadcn for your framework, then merge this exact entry into components.json:

```json
{
  "registries": {
    "@tidal-pro": {
      "url": "https://tidalui.com/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${TIDALUI_TOKEN}"
      }
    }
  }
}
```

The namespace must be named **@tidal-pro** because transitive Pro dependencies use that namespace. Obtain an agent key from your active Pro account at https://tidalui.com/account. Keep TIDALUI_TOKEN in your local environment, never in components.json, client code, Git or logs.

```sh
export TIDALUI_TOKEN='your-private-agent-key'
npx shadcn@latest add @tidal-pro/waitlist-form
npx shadcn@latest add https://tidalui.com/r/tidal-button.json
```

Free command: `npx shadcn@latest add https://tidalui.com/r/<name>.json`.
Pro command: `npx shadcn@latest add @tidal-pro/<name>`.

Import the base stylesheet and every stylesheet listed on the installed item's metadata. For example:

```tsx
import "./components/ui/tidal.css";
import "./components/ui/hero-section.css";
// Place installed components inside this wrapper:
<div className="tidal-scope" data-theme="dark">...</div>
```

Omit data-theme for the default light theme. Put the attribute on the same tidal-scope element for dark mode. Every component installs the shared free tidal-base dependency. After upgrading, run `npx shadcn@latest add https://tidalui.com/r/tidal-base.json --overwrite` to receive current tokens. Review local modifications before overwriting.

Vite: Use React + TypeScript. Map @/* to ./src/* in paths and Vite resolve.alias. Import tidal.css and each component stylesheet in your application entry.

Next.js 15 App Router: Next.js App Router: import tidal.css and component CSS in app/layout.tsx. Interactive examples belong in a client component with "use client". Map @/* to ./* or ./src/* to match your project.

TypeScript 6: use paths without baseUrl:

```json
{
  "compilerOptions": {
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}
```

Pro registry requests are server/CLI-only. Use the same-origin account interface in a browser; cross-origin Authorization preflights are intentionally unsupported.


## Install Account menu + profile card

```sh
npx shadcn@latest add @tidal-pro/account-menu-profile-card
```

Stylesheets: `components/ui/tidal.css`, `components/ui/account-menu-profile-card.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/account-menu-profile-card.css";
import{TidalAccountMenuProfileCard}from"./components/ui/account-menu-profile-card";
export default()=><div className="tidal-scope"><TidalAccountMenuProfileCard groups={[{id:"example",items:[{kind:"link",href:"#",id:"example",label:"Demo"}]}]} profile={{name:"Demo"}}/></div>;
```

## Structured props

- `TidalAccountMenuProfileCard.groups: ReadonlyArray<TidalAccountMenuGroup>`: Required groups value accepted by this exported component.
- `TidalAccountMenuProfileCard.profile: TidalAccountProfile`: Required profile value accepted by this exported component.
- `TidalAccountMenuProfileCard.contentProps?: Omit<Omit<Popover.PopoverContentProps & RefAttributes<HTMLDivElement>, "ref">, "children" | "asChild" | "forceMount"> | undefined`: Optional content props value accepted by this exported component.
- `TidalAccountMenuProfileCard.contentRef?: Ref<HTMLDivElement> | undefined`: Optional content ref value accepted by this exported component.
- `TidalAccountMenuProfileCard.defaultOpen?: boolean | undefined` (default false): Optional default open value accepted by this exported component.
- `TidalAccountMenuProfileCard.dir?: "ltr" | "rtl" | undefined` (default "ltr"): Optional dir value accepted by this exported component.
- `TidalAccountMenuProfileCard.emptyMessage?: ReactNode` (default "No account actions are available."): Optional empty message value accepted by this exported component.
- `TidalAccountMenuProfileCard.footer?: ReactNode`: Optional footer value accepted by this exported component.
- `TidalAccountMenuProfileCard.onOpenChange?: ((open: boolean) => void) | undefined`: Callback invoked when the open change interaction is proposed.
- `TidalAccountMenuProfileCard.open?: boolean | undefined`: Optional open value accepted by this exported component.
- `TidalAccountMenuProfileCard.rootProps?: Omit<HTMLAttributes<HTMLDivElement>, "dir" | "children"> | undefined`: Optional root props value accepted by this exported component.
- `TidalAccountMenuProfileCard.theme?: "light" | "dark" | undefined` (default "light"): Optional theme value accepted by this exported component.
- `TidalAccountMenuProfileCard.triggerLabel?: string | undefined` (default `Open account menu for ${profile.name}`): Optional trigger label value accepted by this exported component.
- `TidalAccountMenuProfileCard.triggerProps?: Omit<Omit<Popover.PopoverTriggerProps & RefAttributes<HTMLButtonElement>, "ref">, "children" | "asChild"> | undefined`: Optional trigger props value accepted by this exported component.
- `TidalAccountMenuProfileCard.triggerRef?: Ref<HTMLButtonElement> | undefined`: Optional trigger ref value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/account-menu-profile-card.tsx) | [Manifest](https://tidalui.com/examples/account-menu-profile-card.json). Install the listed additional dependencies. Consumer fixture: TypeScript pass; Vite pass. This fixture check is distinct from the actual shadcn install receipt.

```tsx
import "./components/ui/tidal.css";

import { useId, useMemo, useRef, useState } from "react";

import { Accessibility, LayoutGrid, RotateCcw, Settings2, UserRound } from "lucide-react";

import { TidalAccountMenuProfileCard, type TidalAccountMenuGroup } from "./components/ui/account-menu-profile-card";

import "./components/ui/account-menu-profile-card.css";



const tidalExampleStyles = ".tidal-scope .account-profile-demo,\n.tidal-scope .account-profile-demo * {\n  box-sizing: border-box;\n}\n\n.tidal-scope .account-profile-demo {\n  display: grid;\n  width: 100%;\n  max-width: 1160px;\n  min-width: 0;\n  grid-template-columns: minmax(0, 1fr);\n  overflow: hidden;\n  border: 1px solid var(--t-border);\n  border-radius: 22px;\n  background: var(--t-surface);\n  color: var(--t-ink);\n  box-shadow: 0 32px 70px -50px #0000008f;\n  container: account-profile-demo / inline-size;\n}\n\n.tidal-scope .account-profile-demo-kicker {\n  display: block;\n  color: var(--t-muted);\n  font-size: 11px;\n  font-weight: 690;\n  letter-spacing: 0.11em;\n  line-height: 1.4;\n  text-transform: uppercase;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .account-profile-demo-stage {\n  display: flex;\n  min-width: 0;\n  flex-direction: column;\n  padding: 25px;\n  background:\n    linear-gradient(var(--t-border) 1px, transparent 1px),\n    linear-gradient(90deg, var(--t-border) 1px, transparent 1px),\n    var(--t-subtle);\n  background-size: 22px 22px;\n}\n\n.tidal-scope .account-profile-demo-topbar {\n  display: flex;\n  min-width: 0;\n  align-items: center;\n  justify-content: space-between;\n  gap: 18px;\n  padding: 13px 13px 13px 16px;\n  border: 1px solid var(--t-border);\n  border-radius: 18px;\n  background: var(--t-surface);\n}\n\n.tidal-scope .account-profile-demo-topbar > div:first-child {\n  min-width: 0;\n}\n\n.tidal-scope .account-profile-demo-topbar p {\n  max-width: 42ch;\n  margin: 4px 0 0;\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.5;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .account-profile-demo-sheet {\n  width: min(100%, 600px);\n  min-width: 0;\n  margin: auto;\n  padding: 22px;\n  border: 1px solid var(--t-border);\n  border-radius: 18px;\n  background: var(--t-surface);\n  box-shadow: 0 20px 50px -42px #0000008f;\n  transition:\n    padding 320ms var(--t-ease-out),\n    transform 320ms var(--t-ease-out);\n}\n\n.tidal-scope\n  .account-profile-demo[data-density=\"compact\"]\n  .account-profile-demo-sheet {\n  padding-block: 15px;\n  transform: scale(0.985);\n}\n\n.tidal-scope .account-profile-demo-sheet-head {\n  display: flex;\n  min-width: 0;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  padding-bottom: 17px;\n  border-bottom: 1px solid var(--t-border);\n}\n\n.tidal-scope .account-profile-demo-sheet-head > div {\n  min-width: 0;\n}\n\n.tidal-scope .account-profile-demo-sheet-head h3 {\n  margin: 6px 0 0;\n  font-size: 20px;\n  font-weight: 560;\n  letter-spacing: -0.04em;\n  line-height: 1.1;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .account-profile-demo-sheet-head button {\n  display: inline-flex;\n  min-width: 44px;\n  min-height: 44px;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  padding: 8px 12px;\n  border: 1px solid var(--t-border);\n  border-radius: 10px;\n  background: var(--t-surface);\n  color: var(--t-ink);\n  font: inherit;\n  font-size: 11px;\n  font-weight: 650;\n  cursor: pointer;\n  transition:\n    background 160ms,\n    transform 140ms var(--t-ease-out);\n}\n\n.tidal-scope .account-profile-demo-sheet-head button:hover {\n  background: var(--t-wash);\n}\n\n.tidal-scope .account-profile-demo-sheet-head button:active {\n  transform: scale(0.98);\n}\n\n.tidal-scope .account-profile-demo-sheet-head button:focus-visible {\n  outline: 2px solid var(--t-accent);\n  outline-offset: 3px;\n}\n\n.tidal-scope .account-profile-demo-fields {\n  display: grid;\n  grid-template-columns: repeat(3, minmax(0, 1fr));\n  min-width: 0;\n  margin-top: 18px;\n  border: 1px solid var(--t-border);\n  border-radius: 10px;\n  overflow: hidden;\n}\n\n.tidal-scope .account-profile-demo-fields > div {\n  min-width: 0;\n  padding: 13px;\n  background: var(--t-subtle);\n  transition: padding 320ms var(--t-ease-out);\n}\n\n.tidal-scope\n  .account-profile-demo[data-density=\"compact\"]\n  .account-profile-demo-fields\n  > div {\n  padding-block: 8px;\n}\n\n.tidal-scope .account-profile-demo-fields > div + div {\n  border-inline-start: 1px solid var(--t-border);\n}\n\n.tidal-scope .account-profile-demo-fields span,\n.tidal-scope .account-profile-demo-fields strong {\n  display: block;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .account-profile-demo-fields span {\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.4;\n}\n\n.tidal-scope .account-profile-demo-fields strong {\n  margin-top: 5px;\n  font-size: 11px;\n  font-weight: 650;\n  line-height: 1.4;\n}\n\n.tidal-scope .account-profile-demo-status {\n  min-height: 34px;\n  margin: 16px 0 0;\n  padding-inline-start: 12px;\n  border-inline-start: 2px solid var(--t-ink);\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.55;\n  overflow-wrap: anywhere;\n}\n\n@container account-profile-demo (max-width: 700px) {\n  .tidal-scope .account-profile-demo {\n    grid-template-columns: 1fr;\n  }\n\n  .tidal-scope .account-profile-demo-stage {\n    min-height: 480px;\n  }\n}\n\n@container account-profile-demo (max-width: 420px) {\n  \n  .tidal-scope .account-profile-demo-stage {\n    padding: 14px;\n  }\n\n  .tidal-scope .account-profile-demo-topbar {\n    align-items: flex-start;\n    padding: 10px;\n  }\n\n  .tidal-scope .account-profile-demo-topbar > div:first-child {\n    flex: 1;\n  }\n\n  .tidal-scope .account-profile-demo-sheet {\n    margin-top: 28px;\n    padding: 15px;\n  }\n\n  .tidal-scope .account-profile-demo-sheet-head {\n    align-items: flex-start;\n  }\n\n  .tidal-scope .account-profile-demo-sheet-head button {\n    width: 44px;\n    padding-inline: 0;\n    font-size: 0;\n  }\n\n  .tidal-scope .account-profile-demo-sheet-head button svg {\n    width: 16px;\n    height: 16px;\n  }\n\n  .tidal-scope .account-profile-demo-fields {\n    grid-template-columns: 1fr;\n  }\n\n  .tidal-scope .account-profile-demo-fields > div + div {\n    border-inline-start: 0;\n    border-top: 1px solid var(--t-border);\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .tidal-scope .account-profile-demo-sheet,\n  .tidal-scope .account-profile-demo-fields > div,\n  .tidal-scope .account-profile-demo-sheet-head button {\n    transition-duration: 0.01ms;\n  }\n}";

export function AccountMenuProfileCardDemo() {
  const generatedId = useId().replace(/:/g, "");
  const profileTargetId = `account-demo-${generatedId}-profile`;
  const preferencesTargetId = `account-demo-${generatedId}-preferences`;
  const accessibilityTargetId = `account-demo-${generatedId}-accessibility`;
  const [menuOpen, setMenuOpen] = useState(false);
  const [compact, setCompact] = useState(false);
  const [message, setMessage] = useState(
    "Open the account menu to preview its links and actions.",
  );
  const triggerRef = useRef<HTMLButtonElement>(null);

  const groups = useMemo<readonly TidalAccountMenuGroup[]>(
    () => [
      {
        id: "account",
        label: "Account",
        items: [
          {
            kind: "link",
            id: "profile",
            label: "Profile details",
            description: "Review name and contact details",
            href: `#${profileTargetId}`,
            icon: <UserRound size={16} />,
            linkProps: {
              onClick: () =>
                setMessage("Profile details target selected in this preview."),
            },
          },
          {
            kind: "link",
            id: "preferences",
            label: "Preferences",
            description: "Review workspace preferences",
            href: `#${preferencesTargetId}`,
            icon: <Settings2 size={16} />,
            badge: "3 sections",
            linkProps: {
              onClick: () =>
                setMessage("Preferences target selected in this preview."),
            },
          },
        ],
      },
      {
        id: "display",
        label: "Display",
        items: [
          {
            kind: "action",
            id: "density",
            label: compact ? "Use comfortable layout" : "Use compact layout",
            description: "Adjust the workspace density",
            icon: <LayoutGrid size={16} />,
            badge: compact ? "Compact" : "Comfortable",
            closeOnSelect: false,
            onAction: () => {
              setCompact((current) => !current);
              setMessage(
                compact
                  ? "Comfortable sample layout restored."
                  : "Compact sample layout selected.",
              );
            },
          },
          {
            kind: "link",
            id: "accessibility",
            label: "Accessibility settings",
            description: "Review display preferences",
            href: `#${accessibilityTargetId}`,
            icon: <Accessibility size={16} />,
            linkProps: {
              onClick: () =>
                setMessage("Accessibility target selected in this preview."),
            },
          },
        ],
      },
    ],
    [accessibilityTargetId, compact, preferencesTargetId, profileTargetId],
  );

  function resetPreview() {
    setCompact(false);
    setMenuOpen(false);
    setMessage("The local sample was reset. No account data changed.");
    triggerRef.current?.focus({ preventScroll: true });
  }

  return (
    <section
      className="account-profile-demo"
      data-density={compact ? "compact" : "comfortable"}
      aria-label="Account menu and profile card preview"
    >
      <div className="account-profile-demo-stage">
        <header className="account-profile-demo-topbar">
          <div>
            <p>Workspace</p>
          </div>
          <TidalAccountMenuProfileCard
            profile={{
              name: "Rowan Vale",
              email: "rowan@example.test",
              detail: "Sample workspace editor",
              initials: "RV",
            }}
            groups={groups}
            open={menuOpen}
            onOpenChange={setMenuOpen}
            triggerRef={triggerRef}
            footer={<span>Sample profile. Changes stay in this preview.</span>}
          />
        </header>

        <div className="account-profile-demo-sheet">
          <div className="account-profile-demo-sheet-head">
            <div>
              <span className="account-profile-demo-kicker">PROFILE</span>
              <h3 id={profileTargetId}>Account overview</h3>
            </div>
            <button type="button" onClick={resetPreview}>
              <RotateCcw size={15} aria-hidden="true" />
              Reset sample
            </button>
          </div>

          <div className="account-profile-demo-fields" id={preferencesTargetId}>
            <div>
              <span>Display name</span>
              <strong>Rowan Vale</strong>
            </div>
            <div>
              <span>Email</span>
              <strong>rowan@example.test</strong>
            </div>
            <div id={accessibilityTargetId}>
              <span>Layout density</span>
              <strong>{compact ? "Compact" : "Comfortable"}</strong>
            </div>
          </div>

          <p
            className="account-profile-demo-status"
            role="status"
            aria-live="polite"
          >
            {message}
          </p>
        </div>
      </div>
    </section>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <AccountMenuProfileCardDemo />
    </div>
  );
}

```

## Gotchas

- The host application owns data, validation, persistence, navigation, and service side effects described by this API.

## Theme and accessibility

{"tokens":["--t-accent","--t-account-border","--t-account-ease-out","--t-account-ease-spring","--t-account-ink","--t-account-muted","--t-account-subtle","--t-account-surface","--t-account-wash","--t-border","--t-border-strong","--t-canvas","--t-danger","--t-display","--t-ease-out","--t-ease-spring","--t-faint","--t-font","--t-ink","--t-line","--t-muted","--t-primary","--t-primary-contrast","--t-radius-card","--t-radius-control","--t-radius-overlay","--t-radius-panel","--t-ring","--t-shadow-lg","--t-shadow-soft","--t-soft","--t-subtle","--t-surface","--t-wash"],"darkMode":true}

{"keyboard":["Tab and Shift+Tab follow the component's native focus order.","Arrow-key behavior follows the exported composite-control implementation.","Escape dismisses the open overlay where the underlying primitive supports dismissal."],"aria":"The component wires labels and relationships from consumer-provided visible text or ARIA props; preserve those labels in production.","notes":"Verify focus visibility, text alternatives, contrast, and reduced motion in the final composition."}

profile and typed groups are required. Profile name is a string used for the default trigger label; email, detail, imageSrc and initials are consumer-owned. Items are discriminated native links with href/linkProps/ref or native action buttons with onAction/buttonProps/ref. ReactNode labels, descriptions, icons, badges, group labels, footer and empty message preserve nullish values. Controlled or uncontrolled disclosure; theme and dir; root, trigger and content native attributes/refs. Consumers own destinations, action results, account state, requests and persistence.
