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

# Identity

A person as an avatar beside their name and an email or a role, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `Identity`.

## Try it

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.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-identity.json --yes
```

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

## Usage

```tsx
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

### Options

- `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'>

## Keyboard

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

## Related

- [Card](/themes/trail/components/card): A framed surface that holds one piece of content or a list of settings rows.
- [Card grid](/themes/trail/components/card-grid): A grid that sets several cards out in even columns that wrap with its width, for projects, files or features.
- [Item](/themes/trail/components/item): One row of a list of records.
- [List group](/themes/trail/components/list-group): A group of a list's rows under a header bar with its name and count that folds open and closed, such as issues by status.
