@alaminrifat/react-multiselect-dropdown
v1.0.3
Published
A React MultiSelect Dropdown component with search functionality
Maintainers
Readme
React MultiSelect Dropdown
A customizable React MultiSelect Dropdown component with search functionality and TypeScript support.
Preview

Installation
npm install react-multiselect-searchimport { MultiSelectDropdown } from "@alaminrifat/react-multiselect-dropdown";
const options = [
{ id: 1, label: "Option 1" },
{ id: 2, label: "Option 2" },
{ id: 3, label: "Option 3" }
{ id: 4, label: "Option 4" }
{ id: 5, label: "Option 5" }
{ id: 6, label: "Option 6" }
];
function App() {
const [selected, setSelected] = useState([]);
const [search, setSearch] = useState("");
return (
<MultiSelectDropdown
options={options}
selected={selected}
search={search}
onSearchChange={setSearch}
onSelectedChange={setSelected}
/>
);
}Props:
| Prop | Type | Description |
| ------------------ | ------------------------------ | --------------------------- |
| options | Option[] | Array of options to display |
| selected | Option[] | Array of selected options |
| search | string | Search input value |
| onSearchChange | (search: string) => void | Search change handler |
| onSelectedChange | (selected: Option[]) => void | Selection change handler |
