npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-person-select.json --yesPerson select
ProA 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.
What an agent sees
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>
);
}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.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-person-select.json --yesAdd the Goop Person select to this project. The install steps are at https://goop.so/docs/install.mdUsage
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", writeshape="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
- Each option with its sentence: person-select--options.md
- State: open (open / defaultOpen / onOpenChange); value (value / defaultValue / onValueChange); drawn by data-focus-visible, data-state=open, data-disabled, data-placeholder
- data-slot values (to select a part by): person-select, person-select-empty-icon, person-select-group, person-select-value, select-input-row, select-input-shortcut
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 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' —
fieldthe Select's form field;chipthe Select's property chip, a side panel's assignee beside its status chip. Or:fieldthe form field holding the avatars; left out, the quiet value in a PropertyRow, the field elsewhere. Or:chipthe quiet value: several people take no bordered chip. - variant?: 'default' | 'ghost' | 'default' | 'ghost' | 'ghost' = 'default' — The chip's look (
shape="chip"):defaultthe bordered chip,ghosta properties panel's quiet value. Or: With noshape,ghostdraws 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
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-focus-visible, data-state=open, data-disabled, data-placeholder
- Types: PersonOption = { id: string; name: string; initials?: string; hue?: AvatarHue; image?: string }
Keyboard
| Key | What it does |
|---|---|
| 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
Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:
| State | Drawn by |
|---|---|
| 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.