Multiple Select

Multiple Select is an interface component that enables the selection of multiple values, commonly used for tagging, filtering, or categorization.

Example

Installation

Install following dependencies:

npm install react-aria-components tw-animate-css tailwindcss-react-aria-components class-variance-authority lucide-react clsx tailwind-merge motion

Add cn helper using clsx and twMerge for conditional class merging in Tailwind components.

lib/utils.ts

Copy and paste the following code into your project.

components/ui/core/multiple-select.tsx
npx @libravelui@latest add multiple-select

Anatomy

import { MultipleSelect } from "@/components/ui/core/multiple-select";
<MultipleSelect<(typeof genres)[number]>
  items={genres}
  value={selected}
  onChange={setSelected}
  label="Genres"
  placeholder="Select genres"
  inputPlaceholder="Search genres..."
  className="min-w-64"
/>

Props

Loading types…