Pickers

Multiple Select

A flexible dropdown input that enables users to select multiple options, ideal for tagging, categorization, and filtering tasks.

Basic

The basic multiple select component lets you select multiple options from a list. It displays selected options with Tag components.

Loading...

Installation

npx shadcn@latest add @intentui/multiple-select

Composed components

When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.

This component comes packed with several components to enhance functionality and provide a seamless experience.

Manual installation

npm i react-aria-components react-aria @intentui/icons

Anatomy

import { MultipleSelect, MultipleSelectItem, MultipleSelectLabel, MultipleSelectSection } from "@/components/ui/multiple-select"
<MultipleSelect
  className="min-w-2xs max-w-min"
  placeholder="Select fruits"
  aria-label="Fruits"
  items={fruits}
>
  {(item) => {
    return (
      <MultipleSelect.Item textValue={item.name}>
        {item.name}
      </MultipleSelect.Item>
    )
  }}
</MultipleSelect>

Controlled

This component lets you select tags dynamically, updating the list with callbacks on add and remove. It displays selected tags with Tag components and logs each action.

Loading...

Max items

You can limit the number of selected items using the maxItems prop.

Loading...

Invalid

When the component is invalid, it displays an error message.

Loading...

Disabled

When the component is disabled, it prevents the user from adding or removing tags.

Loading...

Props

Here's the fixed table:

PropTypeDefaultDescription
labelstring-The label of the multiple select
descriptionstring-The description of the multiple select
placeholderstring-The placeholder of the multiple select
classNamestring-The class name of the multiple select
namestring-The name of the multiple select
itemsarray of objects-The list of multiple select items (options)
selectedKeysSelection-The selected keys of the multiple select
onSelectionChangefunction-The callback function for selection
maxItemsnumber-The max number of items that can be selected
isDisabledboolean-The disabled state of the multiple select
isInvalidboolean-The invalid state of the multiple select
errorMessagestring-The error message if invalid
Unlock the full power of
Design Intent UI
Build modern web apps faster with 350+ blocks and polished templates crafted for professionals.
Explore