npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-profile-card.json --yesProfile card
ProA person's own page header, for an account, profile, customer or patient page, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
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>}
/>
);
}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.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-profile-card.json --yesAdd the Goop Profile card to this project. The install steps are at https://goop.so/docs/install.mdUsage
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)) assrc, and send it where you keep photos; on remove, clearsrc. One action at most (Edit profile, Message): more go in the page's header.
API reference
| Option | Type | What it does |
|---|---|---|
| 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.