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

# Person select

A person picker for an assignee, an owner or reviewers, each person shown with their avatar beside their name, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `PersonSelect`.

## Try it

Assign the task to one person or to nobody (the none row), add and remove its reviewers (the list stays open while you pick; several show as their avatars and a count), and set a form’s owner on the rounded field. Type a name to find a person; Escape closes the list and puts you back on the picker. The line under them says who is where, and which list is open.

The team is our own and lives in this page alone: no directory is searched and nothing is saved.

## When to use

- A person picker for an assignee, an owner or reviewers, each person shown with their avatar beside their name.
- Also called: user picker or assignee picker.

## 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 Person select 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-person-select.json --yes
```

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

## Usage

```tsx
import { PersonSelect } from '@/components/ui/goop/person-select';
import { useState } from 'react';
import { Properties, PropertyRow } from '@/components/ui/goop/properties';

function TaskPeople() {
  const team = [
    { id: 'ngozi', name: 'Ngozi Ilori' },
    { id: 'bilal', name: 'Bilal Rashed' },
    { id: 'dagny', name: 'Dagny Holm' },
  ];
  const [assignee, setAssignee] = useState('');
  const [reviewers, setReviewers] = useState<string[]>([]);
  return (
    <Properties>
      <PropertyRow label="Assignee" icon="user">
        <PersonSelect people={team} value={assignee} onValueChange={setAssignee} optional />
      </PropertyRow>
      <PropertyRow label="Reviewers" icon="users">
        <PersonSelect multiple people={team} value={reviewers} onValueChange={setReviewers} />
      </PropertyRow>
    </Properties>
  );
}
```

- Fits: board, inbox, record, schedule (their recipes).
- Also known as: UserSelect, AssigneePicker, PeoplePicker, MemberSelect, UserPicker.
- `<PropertyRow label="Assignee" icon="user"><PersonSelect people={people} value={id} onValueChange={setId} optional /></PropertyRow>`: the bordered chip, beside a status `SelectTrigger shape="chip"`, so both read as controls at rest. Only a dense list meant to read quiet writes `variant="ghost"`. A people directory searched on a server is a Combobox's job, not this one's.
- height, width, gap, text, motion: add no class for these.

## API reference

### PersonSelect: every option

```tsx
import { PersonSelect } from '@/components/ui/goop/person-select';
```

### Options

- people: readonly PersonOption[] — The people the list offers, in its order.
- label?: string — The property's name ("Assignee"): names the picker where no PropertyRow or label does, and makes the default words ("No assignee").
- placeholder?: string — The words shown while nobody is chosen; "No <label>", else "No one", by default.
- searchPlaceholder?: string = 'Search people…' — The search field's placeholder words.
- empty?: ReactNode = 'No one matches' — The words the list shows while no name matches the search.
- name?: string — Sends the chosen ids with the form, under this name.
- open?: boolean — Whether the list is open (controlled).
- defaultOpen?: boolean — Whether the list is open at first (uncontrolled).
- onOpenChange?: (open: boolean) => void — Called when the list opens or closes.
- container?: HTMLElement | null — Where the list is portalled; the end of `<body>` when left out.
- multiple?: false | true — Several people may be chosen.
- shape?: 'field' | 'chip' | 'field' | 'chip' — `field` the select's rounded field; `chip` the select's chip, a side panel's assignee beside its status chip. Or: `field` the rounded field holding the avatars; left out, the bordered chip in a PropertyRow, the field elsewhere. Or: `chip` the quiet chip; the bordered chip is a PropertyRow's own, with `shape` left out.
- variant?: 'default' | 'ghost' | 'default' | 'ghost' | 'ghost' = 'default' — The chip's look: `default` the bordered chip, `ghost` a dense list's quiet value (with no `shape`, the quiet chip). Or: With no `shape`, `default` the bordered chip in a PropertyRow, `ghost` the quiet chip. Or: Several people's chip is the quiet one.
- value?: string | string[] — The chosen person's id, `''` for nobody (controlled). Or: The chosen ids (controlled).
- defaultValue?: string | string[] — The person chosen at first (uncontrolled). Or: The ids chosen at first (uncontrolled).
- onValueChange?: ((id: string) => void) | ((ids: string[]) => void) — Called with the chosen id, `''` when the none row clears it. Or: Called with the whole new list of ids after each pick or clear.
- optional?: boolean — The value may be nobody: the list opens with a row that clears it.
- noneRowLabel?: string — The words of the `optional` row; the placeholder's by default ("No assignee").
- manyLabel?: (count: number) => string — The count after the avatars of several people; "3 people" by default.
- Also takes: onClick?: (event: MouseEvent) => void; disabled?: boolean
- State: open (open / defaultOpen / onOpenChange); value (value / defaultValue / onValueChange); drawn by data-placeholder
- Types: PersonOption = { id: string; name: string; initials?: string; hue?: AvatarHue; image?: string }

## Keyboard

- Enter / Space / ArrowDown: open the list, the focus in its search field
- typing: filter the people by name
- ArrowDown / ArrowUp: move the active row
- Enter: pick the active person (one: the list closes; several: it stays open, the person added or removed)
- Escape: close the list; the focus returns to the trigger

## Accessibility

- The part itself answers the keys above.
- hover, focus-visible: the browser's own (:hover, :focus-visible): write nothing
- placeholder-shown: the attribute data-placeholder

## Motion

- The part sets its own motion: add no transition or animation of your own.

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

- [Properties](/themes/trail/components/properties): A record's properties, each a label and a value edited in place, such as status, assignee and dates, for a record's side panel.
- [Tags input](/themes/trail/components/tags-input): A field a person types several short values into, each one a removable tag — labels, keywords, the emails to invite.
- [Slider](/themes/trail/components/slider): A value or a span chosen by dragging a thumb along a track or with the arrow keys, such as a volume or a price limit.
- [Segmented control](/themes/trail/components/segmented-control): One choice of two to five short options that applies at once — a view or a mode — drawn as touching segments in one pill.
