---
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, reviewers or guests, 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, reviewers or guests, 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>/meadow-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 { useState } from 'react';
import { type PersonOption, PersonSelect } from '@/components/ui/goop/person-select';
import { Progress } from '@/components/ui/goop/progress';
import { Properties, PropertyRow } from '@/components/ui/goop/properties';

const CREW: PersonOption[] = [
  { id: 'dagny', name: 'Dagny Holm' },
  { id: 'bilal', name: 'Bilal Rashed' },
  { id: 'ngozi', name: 'Ngozi Ilori' },
];

function VisitPeople() {
  const [lead, setLead] = useState('');
  const [guests, setGuests] = useState<string[]>([]);
  return (
    <Properties>
      <PropertyRow label="Crew lead" icon="tabler-outline:user-circle">
        <PersonSelect people={CREW} value={lead} onValueChange={setLead} optional />
      </PropertyRow>
      <PropertyRow label="Guests" icon="tabler-outline:user-circle">
        <PersonSelect
          multiple
          people={CREW}
          value={guests}
          onValueChange={setGuests}
          placeholder="Add people"
          searchKey="G"
          empty="No one to add"
        />
      </PropertyRow>
    </Properties>
  );
}
```

- Fits: board, inbox (their recipes).
- Also known as: UserSelect, AssigneePicker, PeoplePicker, MemberSelect, UserPicker.
- In a record's side panel, beside a status `SelectTrigger shape="chip"`, write `shape="chip"` so both read as controls at rest. A people directory searched on a server is a Combobox's job.
- height, width, padding, gap, corner, border, background, text: 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 and its search field where no PropertyRow or label does, and makes the none row's and the placeholder's default words ("No assignee").
- placeholder?: string — The words shown while nobody is chosen; "No <label>" ("No assignee"), else "No one", by default.
- searchPlaceholder?: string = 'Search people…' — The search field's placeholder words; "Search people…" by default.
- searchKey?: string — A key shown in a cap at the search field's end ("A"), for the shortcut your app opens this picker with.
- empty?: ReactNode = 'No one matches' — The words the list shows while no name matches the search; "No one matches" by default.
- name?: string — Sends the chosen id (one hidden field per id for several) 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 form field; `chip` the Select's property chip, a side panel's assignee beside its status chip. Or: `field` the form field holding the avatars; left out, the quiet value in a PropertyRow, the field elsewhere. Or: `chip` the quiet value: several people take no bordered chip.
- variant?: 'default' | 'ghost' | 'default' | 'ghost' | 'ghost' = 'default' — The chip's look (`shape="chip"`): `default` the bordered chip, `ghost` a properties panel's quiet value. Or: With no `shape`, `ghost` draws the quiet value. 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 at its top, the person mark its mark, 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-focus-visible, data-state=open, data-disabled, data-placeholder
- Types: PersonOption = { id: string; name: string; initials?: string; hue?: AvatarHue; image?: string }

## Keyboard

- Enter / Space / ArrowDown: on the trigger: open the list, the focus in its search field
- ArrowDown / ArrowUp: move the active row
- Enter: pick the active row (several: toggle it, the list staying open)
- Backspace: several: in an empty search, take the last person chosen off
- Escape: close the list, the focus back on the trigger

## Accessibility

- The native element answers the keyboard.
- hover: the browser's own (:hover): write nothing
- focus-visible: the attribute data-focus-visible
- expanded: the attribute data-state=open
- open: the attribute data-state=open
- disabled: the attribute data-disabled
- placeholder-shown: the attribute data-placeholder

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

- [Progress](/themes/meadow/components/progress): A bar that fills as work goes on, for an upload or a setup with a known end, or that sweeps while the end is unknown.
- [Properties](/themes/meadow/components/properties): A record's properties, each a quiet value named by an icon or a label, such as who, where and when, for a record's panel.
- [Tags input](/themes/meadow/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/meadow/components/slider): A value or a span chosen by dragging a thumb along a track or with the keys, such as a recording's place, a volume or a price limit.
