# Customer profile

Review one customer's contact details, plan, notes and recent account activity.

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

## When to use

- Use it when a page needs review one customer's contact details, plan, notes and recent account activity.
- 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 customer profile.

## 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 Customer profile

```sh
npx shadcn@latest add @tidal-pro/customer-profile
```

Stylesheets: `components/ui/tidal.css`, `components/ui/customer-profile.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/customer-profile.css";
import{TidalCustomerProfile}from"./components/ui/customer-profile";
export default()=><div className="tidal-scope"><TidalCustomerProfile customer={{name:"Demo"}}/></div>;
```

## Structured props

- `TidalCustomerProfile.customer: TidalCustomerIdentity`: Required customer value accepted by this exported component.
- `TidalCustomerProfile.actions?: ReadonlyArray<TidalCustomerAction> | undefined` (default []): Optional actions value accepted by this exported component.
- `TidalCustomerProfile.activity?: ReadonlyArray<TidalCustomerActivity> | undefined` (default []): Optional activity value accepted by this exported component.
- `TidalCustomerProfile.contacts?: ReadonlyArray<TidalCustomerContact> | undefined` (default []): Optional contacts value accepted by this exported component.
- `TidalCustomerProfile.fields?: ReadonlyArray<TidalCustomerField> | undefined` (default []): Optional fields value accepted by this exported component.
- `TidalCustomerProfile.headingLevel?: "h2" | "h3" | "h4" | "h5" | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalCustomerProfile.health?: TidalCustomerHealth | undefined`: Optional health value accepted by this exported component.
- `TidalCustomerProfile.labels?: Partial<{ profile: string; actions: string; contacts: string; details: string; health: string; plan: string; note: string; activity: string; emptyContacts: string; emptyDetails: string; emptyActivity: string; }> | undefined`: Optional labels value accepted by this exported component.
- `TidalCustomerProfile.note?: ReactNode`: Optional note value accepted by this exported component.
- `TidalCustomerProfile.noteEditor?: ReactNode`: Optional note editor value accepted by this exported component.
- `TidalCustomerProfile.plan?: TidalCustomerPlan | undefined`: Optional plan value accepted by this exported component.

## Complete usage example

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

```tsx
"use client";

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

import { useId, useState, type MouseEvent } from "react";

import { TidalCustomerProfile, type TidalCustomerAction } from "./components/ui/customer-profile";

import "./components/ui/customer-profile.css";

import "./components/ui/status-badge.css";

function tidalExampleAvatarDataUri(seed: unknown) {
  const text = String(seed).replace(/[^a-z0-9]/gi, "").slice(-2) || "UI";
  const palette = ["#333333", "#555555", "#777777", "#999999", "#bbbbbb"];
  const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length];
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96"><rect width="96" height="96" rx="48" fill="${color}"/><circle cx="48" cy="38" r="17" fill="white" fill-opacity=".92"/><path d="M18 92c3-22 15-34 30-34s27 12 30 34" fill="white" fill-opacity=".92"/></svg>`;
  return `data:image/svg+xml,${encodeURIComponent(svg)}`;
}

function tidalExampleImageDataUri(label: string) {
  const safeLabel = label.replace(/[<>&]/g, "").slice(0, 28) || "Sample image";
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 675"><defs><linearGradient id="g" x1="0" x2="1" y1="0" y2="1"><stop stop-color="#171717"/><stop offset="1" stop-color="#555555"/></linearGradient></defs><rect width="1200" height="675" fill="url(#g)"/><circle cx="950" cy="100" r="260" fill="white" fill-opacity=".08"/><text x="80" y="570" fill="white" font-family="system-ui,sans-serif" font-size="64" font-weight="700">${safeLabel}</text></svg>`;
  return `data:image/svg+xml,${encodeURIComponent(svg)}`;
}

const tidalExampleStyles = ".tidal-scope .customer-profile-demo {\n  display: grid;\n  width: 100%;\n  max-width: 980px;\n  min-width: 0;\n  gap: 13px;\n}\n\n.customer-profile-demo-status {\n  min-width: 0;\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.5;\n  text-align: center;\n  overflow-wrap: anywhere;\n}";

function isPlainPrimaryClick(event: MouseEvent<HTMLAnchorElement>) {
  return (
    event.button === 0 &&
    !event.metaKey &&
    !event.ctrlKey &&
    !event.shiftKey &&
    !event.altKey
  );
}

export function CustomerProfileDemo() {
  const generatedId = useId().replace(/:/g, "");
  const noteId = `${generatedId}-customer-note`;
  const [noteDraft, setNoteDraft] = useState(
    "Follow up after the workspace review.",
  );
  const [savedNote, setSavedNote] = useState(
    "The team is reviewing editor access for two new teammates.",
  );
  const [reviewed, setReviewed] = useState(false);
  const [status, setStatus] = useState(
    "Fictional local customer record. Changes stay on this page.",
  );

  const actions: readonly TidalCustomerAction[] = [
    {
      id: "workspace",
      kind: "link",
      label: "Open workspace",
      href: "#sample-customer-workspace",
      linkProps: {
        onClick: (event: import("react").MouseEvent<HTMLAnchorElement>) => {
          if (!isPlainPrimaryClick(event)) return;
          event.preventDefault();
          setStatus("Workspace selected in this local sample.");
        },
      },
    },
    {
      id: "review",
      kind: "button",
      label: reviewed ? "Clear review" : "Mark for review",
      onAction: () => {
        setReviewed((current) => !current);
        setStatus(
          reviewed
            ? "Review marker cleared locally."
            : "Customer marked for local review.",
        );
      },
    },
  ];

  return (
    <div className="customer-profile-demo">
      <TidalCustomerProfile
        customer={{
          name: "Leah Kim",
          company: "Northline Studio",
          detail: "Customer since March 2026",
          imageSrc: tidalExampleAvatarDataUri("07"),
        }}
        health={{
          label: reviewed ? "Needs review" : "On track",
          status: reviewed ? "warning" : "success",
          announce: true,
        }}
        plan={{ name: "Studio", detail: "12 seats" }}
        contacts={[
          {
            id: "email",
            label: "Email",
            value: "leah@example.invalid",
            href: "mailto:leah@example.invalid",
            linkProps: {
              onClick: (event: import("react").MouseEvent<HTMLAnchorElement>) => {
                if (!isPlainPrimaryClick(event)) return;
                event.preventDefault();
                setStatus("Email destination selected. No message was sent.");
              },
            },
          },
          {
            id: "phone",
            label: "Phone",
            value: "+1 555 014 0182",
            href: "tel:+15550140182",
            linkProps: {
              onClick: (event: import("react").MouseEvent<HTMLAnchorElement>) => {
                if (!isPlainPrimaryClick(event)) return;
                event.preventDefault();
                setStatus("Phone destination selected. No call was started.");
              },
            },
          },
        ]}
        fields={[
          { id: "owner", label: "Owner", value: "Mila Chen" },
          { id: "region", label: "Region", value: "Central" },
          { id: "renewal", label: "Review date", value: "November 18" },
        ]}
        actions={actions}
        note={<p>{savedNote}</p>}
        noteEditor={
          <form
            onSubmit={(event) => {
              event.preventDefault();
              const next = noteDraft.trim();
              if (!next) {
                setStatus("Enter a note before saving.");
                return;
              }
              setSavedNote(next);
              setStatus("Note saved in this local sample.");
            }}
            onReset={() => {
              setNoteDraft(savedNote);
              setStatus("Note edit reset locally.");
            }}
          >
            <label htmlFor={noteId}>
              <span>Edit note</span>
              <textarea
                id={noteId}
                name="customerNote"
                value={noteDraft}
                onChange={(event) => setNoteDraft(event.currentTarget.value)}
                required
              />
            </label>
            <div>
              <button type="submit">Save note</button>
              <button type="reset">Reset</button>
            </div>
          </form>
        }
        activity={[
          {
            id: "note",
            title: "Account note updated",
            description: "Editor access is under review.",
            actor: "Mila Chen",
            time: "Today, 10:24 AM",
            dateTime: "2026-10-15T10:24:00-05:00",
          },
          {
            id: "seat",
            title: "Seat count changed",
            description: "The local record moved from 10 to 12 seats.",
            actor: "Noah Reed",
            time: "Yesterday",
            dateTime: "2026-10-14",
          },
          {
            id: "review",
            title: "Workspace review scheduled",
            actor: "Leah Kim",
            time: "October 8",
            dateTime: "2026-10-08",
          },
        ]}
      />
      <output className="customer-profile-demo-status" aria-live="polite">
        {status}
      </output>
    </div>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <CustomerProfileDemo />
    </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-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."],"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."}

Customer requires a name and may include company, detail, image or initials. Consumer-owned contacts preserve native href, link props and refs; fields preserve ReactNode values; health composes Status badge; plan accepts name/detail content. Contact, field, action and activity IDs must be unique within their collections. Actions support native links or caller-first buttons with disabled and aria-disabled normalization, refs, form attributes and native modifiers. Note and editable note editor are consumer-owned slots. Activity items support exact time/dateTime, actor, description and native detail destinations. Root native section attributes/ref, h2-h5 heading level with following section headings, numeric/nullish content, empty labels and per-instance IDs are supported. Consumers own authorization, state, note editing, confirmation, CRM, messaging, navigation, requests and persistence. The component performs no side effect.
