Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-multi-select.json --yes

Multi select

Pro

A field holding several values picked from a fixed list, for React and Tailwind CSS. Part of Goop Pro.

In the form look, pick and unpick labels (the list stays open), at most three: then the rest turn unavailable and the search counts “3 of 3”, and the field folds the third into “+1”. Search them, remove one with its cross or Backspace, clear them all; Save with none is refused. The people list loads after a pause; pick several and their tags wrap, a long name cut; Save shows what the form sends. The beside look sets two multi-selects under a select. The chips look is a create dialog’s row of property chips: dashed while empty, the areas chip folded to its colour marks with a tooltip naming them; type a label the labels chip lacks and Enter on “Create …” makes it. Each look’s line names the list that is open. The people arrive on a timer; a label made from the chip lives in the page only. The multi-select has no loading state of its own: the example disables the field and says "Loading…" while they come.

When to use

  • A field holding several values picked from a fixed list.
  • Also called: multiple select.

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

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-multi-select.json --yes
PROMPT
Add the Goop Multi select to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { useState } from 'react';
import { Field } from '@/components/ui/goop/field';
import { FieldInvalid } from '@/components/ui/goop/field-error';
import { MultiSelect, MultiSelectGroup, MultiSelectItem } from '@/components/ui/goop/multi-select';

function SurveyLabels() {
  const [labels, setLabels] = useState<string[]>(['bug']);
  return (
    <Field label="Labels" orientation="vertical" className="w-full">
      <FieldInvalid error={labels.length === 0 ? 'Pick at least one label.' : undefined}>
        <MultiSelect
          name="labels"
          value={labels}
          onValueChange={setLabels}
          placeholder="Add labels"
          searchPlaceholder="Find a label…"
          empty="No label matches"
          maxShown={3}
          max={5}
        >
          <MultiSelectGroup heading="Type">
            <MultiSelectItem value="bug">Bug</MultiSelectItem>
            <MultiSelectItem value="feature">Feature</MultiSelectItem>
          </MultiSelectGroup>
          <MultiSelectGroup heading="Area">
            <MultiSelectItem value="design">Design</MultiSelectItem>
            <MultiSelectItem value="docs">Docs</MultiSelectItem>
          </MultiSelectGroup>
        </MultiSelect>
      </FieldInvalid>
    </Field>
  );
}
  • Fits: flow, record, settings: field.
  • Also known as: MultiCombobox, TagSelect, ChipsSelect, TokenField.
  • It fills its column: in a form, a vertical Field (as wide as its column, 40 px as the select there); in a settings row, the row's stack="always", which puts it under the row's words across the row. Put a FieldInvalid between the field and it for an error line.
  • height, width, padding, gap, corner, border, background, text, motion: add no class for these.

API reference

  • Each option with its sentence: multi-select--options.md
  • State: value (value / defaultValue / onValueChange); open (open / defaultOpen / onOpenChange); drawn by data-focus-visible, data-state=open, data-invalid
Parts
PartWhat it is
MultiSelectItemOne option of the list; its props: multi-select--item.md
MultiSelectGroupA group of the list's options under its heading (the select's group: 12 px semibold words in the muted grey)
  • data-slot values (to select a part by): multi-select, multi-select-action, multi-select-badge, multi-select-chip-content, multi-select-chip-words, multi-select-count, multi-select-error, multi-select-icon, multi-select-input, multi-select-list, multi-select-text, multi-select-trigger, multi-select-value, multi-select-value-close

MultiSelectItem

One option of the list.

TSX
import { MultiSelectItem } from '@/components/ui/goop/multi-select';

Options

  • value: string — The value it adds to the field's list.
  • Also takes: disabled?: boolean; keywords?: string[]; icon?: IconName; mark?: ReactNode; action?: ReactNode

MultiSelect: every option

TSX
import { MultiSelect } from '@/components/ui/goop/multi-select';

Options

  • ref?: Ref<HTMLDivElement | HTMLButtonElement>
  • value?: string[]
  • defaultValue?: string[]
  • onValueChange?: (values: string[]) => void
  • open?: boolean
  • defaultOpen?: boolean = false
  • onOpenChange?: (open: boolean) => void
  • placeholder?: string
  • searchPlaceholder?: string
  • empty?: ReactNode
  • maxShown?: number
  • max?: number
  • countLabel?: (count: number, max: number) => string
  • more?: (count: number) => string
  • clearLabel?: string = 'Clear all'
  • removeLabel?: (words: string) => string
  • chosenLabel?: (words: readonly string[]) => string
  • name?: string
  • size?: 'sm' | 'md' = 'md'
  • shape?: 'field' | 'chip' = 'field'
  • variant?: 'default' | 'ghost' = 'default'
  • renderValue?: (values: readonly string[]) => ReactNode
  • label?: string
  • icon?: IconName
  • iconOnly?: boolean | 'narrow' = false
  • noneLabel?: string = 'none'
  • optional?: boolean = false
  • noneRowLabel?: string
  • onCreate?: (words: string) => string | undefined | PromiseLike<string | undefined>
  • createLabel?: (words: string) => string
  • creatingLabel?: (words: string) => string
  • disabled?: boolean = false
  • container?: HTMLElement | null
  • id?: string
  • aria-invalid?: boolean | 'true' | 'false'
  • children?: ReactNode
  • State: value (value / defaultValue / onValueChange); open (open / defaultOpen / onOpenChange); drawn by data-focus-visible, data-state=open, data-invalid

Shortened to fit; what went is in agent/ship/manifest.json.

Keyboard

KeyWhat it does
Enter Space ArrowDownOpen the list from the opener, the focus in its search field
ArrowDown ArrowUpMove the active row in the list
ArrowDown / ArrowUp at maxAlso reach the rows unavailable at the most (said unavailable, described by the count); Enter on one picks nothing
EnterAdd or remove the active row's value; the list stays open
BackspaceIn an empty search field, remove the last value
EscapeClose the list; the focus returns to the opener
Enter / Space on a tag's crossRemove that value; the focus moves to the next cross, else the previous, else the opener

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:

StateDrawn by
focus-visiblethe attribute data-focus-visible
expandedthe attribute data-state=open
openthe attribute data-state=open
disabledthe prop disabled
invalidthe attribute data-invalid

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.

goop.so/themes/meadow/components/multi-select.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-multi-select.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.