---
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/"
---

# Profile card

A person's own page header, for an account, profile, customer or patient page, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `ProfileCard`.

## Try it

Press the picture to open its photo menu: Upload photo picks a picture from your device and shows it, Remove photo takes it away; add the card’s one action and press it (counted); Tab walks the picture, then the action.

The photo stays in this browser tab and is sent nowhere, and Edit profile only counts its presses.

## When to use

- A person's own page header, for an account, profile, customer or patient page.

## 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 Profile card 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-profile-card.json --yes
```

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

## Usage

```tsx
import { useState } from 'react';
import { Button } from '@/components/ui/goop/button';
import { ProfileCard } from '@/components/ui/goop/profile-card';

function AccountHeader() {
  const [photo, setPhoto] = useState<string | undefined>(undefined);
  return (
    <ProfileCard
      name="Teodora Valk"
      description="teodora@fieldwork.test"
      src={photo}
      onPhotoUpload={(file) => setPhoto(URL.createObjectURL(file))}
      onPhotoRemove={() => setPhoto(undefined)}
      action={<Button variant="ghost">Edit profile</Button>}
    />
  );
}
```

- Fits: record, account: header (subject: person).
- Put it first on the person's page, the page's width; their facts go in Properties under it, never in the card. Keep the photo yourself: on upload, show the file (`URL.createObjectURL(file)`) as `src`, and send it where you keep photos; on remove, clear `src`. One action at most (Edit profile, Message): more go in the page's header.

## API reference

### Options

- `name: string` — The person's name: the card's title, and the picture's initials while there is no photo.
- `description?: ReactNode` — The one line under the name: their email, their role.
- `src?: string | undefined` — The person's photo; with none, their initials on their colour.
- `fill?: string | undefined` — The picture's own colour (the person's, content, never the theme's); with none, a colour taken from the name.
- `onPhotoUpload?: (file: File) => void` — Upload photo was picked and a file chosen: show it (`src`).
- `onPhotoRemove?: () => void` — Remove photo was picked (it is off while there is no `src`).
- `action?: ReactNode` — The card's one action, at the end of the name's line: the theme's Button.

## Accessibility

- The native element answers the keyboard.

## 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.

## Related

- [Button](/themes/meadow/components/button): A button with words that runs an action, in several looks and sizes, on a page, in a row or in a sidebar.
- [Promo card](/themes/meadow/components/promo-card): A card that offers something (an app to download, a plan to upgrade to, a feature that is new), for a page or a settings pane.
- [Quote](/themes/meadow/components/quote): A testimonial: words someone said, with an attribution, often a portrait or a logo beside it.
- [Reply actions](/themes/meadow/components/reply-actions): The row of actions under an AI answer that copies it, rates it good or bad and asks for it again.
