Skip to content

Multi Select

The MultiSelect component lets users select multiple options from a dropdown list. Selected options appear as removable tags, and users can optionally create new options by typing. It’s suited to scenarios where more than one value is needed — tags, frameworks, labels, and similar.

Installation

import { MultiSelect, MultiSelectOption } from "@harnessio/ui/components";
import { useState } from "react";
// Basic usage with controlled component
const MyComponent = () => {
const [selected, setSelected] = useState<MultiSelectOption[]>([]);
return (
<MultiSelect
label="Select frameworks"
placeholder="Select options..."
options={[
{ key: "react", id: "react" },
{ key: "vue", id: "vue" },
{ key: "angular", id: "angular" },
]}
value={selected}
onChange={setSelected}
/>
);
};