Multi Select
Multi Select composes searchable options and multiple selected values in one field.
Practical React example
Assign several tags to a record while keeping the selected IDs separate from the search query.
Before you copy and paste
Keep the example in the React rendering environment required by the imported component. Copy components/motion/multi-select/index.tsx and its returned support files from the Code tab; preserve the project-relative paths.
Listed package dependencies: clsx, lucide-react, motion, react, react-dom, tailwind-merge.
Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.
Assign several tags to a record while keeping the selected IDs separate from the search query
// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";
import { Circle } from "lucide-react";
import {
MultiSelect,
MultiSelectContent,
MultiSelectEmpty,
MultiSelectGroup,
MultiSelectInput,
MultiSelectItem,
MultiSelectLabel,
MultiSelectList,
MultiSelectTrigger,
MultiSelectValue,
} from "@/components/motion/multi-select";
const colors = {
design: "fill-rose-500 text-rose-500",
engineering: "fill-sky-500 text-sky-500",
product: "fill-amber-500 text-amber-500",
research: "fill-violet-500 text-violet-500",
marketing: "fill-emerald-500 text-emerald-500",
operations: "fill-slate-500 text-slate-500",
};
function Option({
value,
children,
}: {
value: keyof typeof colors;
children: string;
}) {
return (
<MultiSelectItem value={value} textValue={children}>
<span className="flex items-center gap-2.5">
<Circle aria-hidden="true" className={`size-2.5 ${colors[value]}`} />
{children}
</span>
</MultiSelectItem>
);
}
export function MultiSelectPreview() {
return (
<div className="flex min-h-[420px] w-full items-start justify-center px-4 pt-24">
<div className="w-full max-w-sm">
<MultiSelect defaultValue={["design", "engineering"]}>
<MultiSelectTrigger>
<MultiSelectValue placeholder="Choose teams" />
<MultiSelectInput aria-label="Search teams" />
</MultiSelectTrigger>
<MultiSelectContent>
<MultiSelectList ariaLabel="Teams">
<MultiSelectGroup>
<MultiSelectLabel>Product teams</MultiSelectLabel>
<Option value="design">Design</Option>
<Option value="engineering">Engineering</Option>
<Option value="product">Product</Option>
<Option value="research">Research</Option>
</MultiSelectGroup>
<MultiSelectGroup>
<MultiSelectLabel>Business teams</MultiSelectLabel>
<Option value="marketing">Marketing</Option>
<Option value="operations">Operations</Option>
</MultiSelectGroup>
<MultiSelectEmpty>No teams found.</MultiSelectEmpty>
</MultiSelectList>
</MultiSelectContent>
</MultiSelect>
</div>
</div>
);
}
Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.
Own the selected collection in the parent when it affects a saved record. Use stable values and decide how removed or no-longer-available options are represented.
Customization
- MultiSelectProps.children
- Required; ReactNode.
- MultiSelectProps.value
- Optional; string[].
- MultiSelectProps.defaultValue
- Optional; string[].
- MultiSelectProps.onValueChange
- Optional; (value: string[]) => void.
- MultiSelectProps.open
- Optional; boolean.
- MultiSelectProps.defaultOpen
- Optional; boolean.
- MultiSelectProps.onOpenChange
- Optional; (open: boolean) => void.
- MultiSelectProps.query
- Optional; string.
- MultiSelectProps.defaultQuery
- Optional; string.
- MultiSelectProps.onQueryChange
- Optional; (query: string) => void.
- MultiSelectProps.filter
- Optional; MultiSelectFilter.
- MultiSelectProps.disabled
- Optional; boolean.
- MultiSelectProps.className
- Optional; string.
- MultiSelectTriggerProps.children
- Required; ReactNode.
Integration notes
- Limit or validate the selected values in the application, not only in the visible list.
- Provide clear removal labels and check keyboard navigation across both the input and selected chips.
Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.
Give your agent taste.
The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.
All components are free. Sign up only to connect MCP.