npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-identity.json --yesIdentity
ProA person as an avatar beside their name and an email or a role, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
import { Identity } from '@/components/ui/goop/identity';
<div className="flex flex-col gap-4">
<Identity name="Teodora Valk" description="teodora@fieldwork.test" href="/people/teodora" />
<Identity size="sm" orientation="horizontal" name="Bilal Rashed" description="Admin" />
<Identity size="lg" name="Ngozi Ilori" description="Member" asChild>
<RouterLink href="/people/ngozi" />
</Identity>
</div>Type a name and a second line (an email, a role) and watch the avatar take its initials and colour from the name; switch the size and the orientation, make the name a link, or pick a look: the three sizes, one line, a link, a name too long for its column. The people are ours, shown by their initials; the link goes nowhere.
When to use
- A person as an avatar beside their name and an email or a role.
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 Identity 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>/trail-identity.json --yesAdd the Goop Identity to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Identity } from '@/components/ui/goop/identity';
<div className="flex flex-col gap-4">
<Identity name="Teodora Valk" description="teodora@fieldwork.test" href="/people/teodora" />
<Identity size="sm" orientation="horizontal" name="Bilal Rashed" description="Admin" />
<Identity size="lg" name="Ngozi Ilori" description="Member" asChild>
<RouterLink href="/people/ngozi" />
</Identity>
</div>- Fits: inbox, record (their recipes).
- Also known as: User, UserCell, Person, PersonChip, AvatarWithName, UserInfo.
- height, width, padding, gap, text: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| name | string | The person's name: the first line, and the avatar's initials and hue unless initials is given. |
| description? | ReactNode | The second line: the person's email or role, in the grey. |
| size? | 'sm' | 'md' | 'lg' = 'md' | sm (a table cell, a menu), md (a list row) or lg (over a record). |
| orientation? | 'vertical' | 'horizontal' = 'vertical' | vertical the name over the second line; horizontal the two on one line, a dot between them. |
| image? | string | The person's picture; the initials show until it loads, and in its place if it fails. |
| initials? | string | The avatar's letters, where the name's initials are wrong; at most two. |
| hue? | AvatarHue | A fixed avatar colour in place of the hue taken from the name (neutral: the theme's grey). |
| shape? | 'circle' | 'square' = 'circle' | The avatar's shape: circle (the default) for a person, square for a company, a team or a workspace. |
| fill? | string | The avatar's own fill, any CSS colour (the person's own colour); wins over hue. |
| href? | string | The name as a link to the person (their profile, their record). |
| asChild? | boolean = false | Draws the NAME (not the root) on your one child element: a router's link, a button. |
| children? | ReactNode | With asChild: the one element the name is drawn on. |
- Types: AvatarHue = Exclude<Hue, 'primary'>
- data-slot values (to select a part by): identity, identity-content, identity-description, identity-separator, identity-title
Keyboard
| Key | What it does |
|---|---|
| Tab | Reach the name, only where it is a link (href) or the caller's own link or button (asChild); otherwise the identity is no tab stop |
| Enter | On a name that is a link or a button: follow the link, or press the button |
Accessibility
- The part itself answers the keys above.
- hover, focus-visible: the browser's own (:hover, :focus-visible): write nothing
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.