npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-person-select.json --yesPerson select
ProA 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.
What an agent sees
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>
);
}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.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-person-select.json --yesAdd the Goop Person select to this project. The install steps are at https://goop.so/docs/install.mdUsage
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 statusSelectTrigger shape="chip", so both read as controls at rest. Only a dense list meant to read quiet writesvariant="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
- Each option with its sentence: person-select--options.md
- State: open (open / defaultOpen / onOpenChange); value (value / defaultValue / onValueChange); drawn by data-placeholder
- data-slot values (to select a part by): person-select
PersonSelect: every option
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' —
fieldthe select's rounded field;chipthe select's chip, a side panel's assignee beside its status chip. Or:fieldthe rounded field holding the avatars; left out, the bordered chip in a PropertyRow, the field elsewhere. Or:chipthe quiet chip; the bordered chip is a PropertyRow's own, withshapeleft out. - variant?: 'default' | 'ghost' | 'default' | 'ghost' | 'ghost' = 'default' — The chip's look:
defaultthe bordered chip,ghosta dense list's quiet value (with noshape, the quiet chip). Or: With noshape,defaultthe bordered chip in a PropertyRow,ghostthe 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
optionalrow; 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
| Key | What it does |
|---|---|
| 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
Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:
| State | Drawn by |
|---|---|
| placeholder-shown | the attribute data-placeholder |
Motion
- The part sets its own motion: add no transition or animation of your own.
- How the theme moves, and how to move your own parts the same way: Motion.
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.