Docs
Multi-select

Multi Select

Multi select component to select multiple values from options.

Usage

Example Code

1import { MultiSelect, MultiSelectItem } from "inc-design-system/multiselect";

Example Code

1<MultiSelect items={data} />

Props

MultiSelect

PropTypeDescriptionDefault
itemsMultiSelectItem[]Array of items to be displayed in the multi-select.-
selectedItemsMultiSelectItem[]Array of initially selected items.-
placeholderTextstringPlaceholder text displayed when no items are selected."Select items..."
notFoundTextstringText displayed when no items match the search criteria.-
tagVariant"default" | "primary" | "secondary" | "transparentBackground"Variant for the tag displayed for selected items.-
tagClassNamestringAdditional class name for the tag component.-
widthReact.CSSProperties['width']Width of the multi-select."512px"
inputHeightReact.CSSProperties['height']Height of the input field."40px"
dropdownMaxHeightReact.CSSProperties['height']Maximum height of the dropdown."384px"
inputScrollablebooleanWhether the input field should be scrollable.false
maxSelectedItemsnumberMaximum number of items that can be selected.Number.MAX_SAFE_INTEGER
hidePlaceholderWhenSelectedbooleanWhether to hide the placeholder when items are selected.false
disabledbooleanWhether the multi-select is disabled.false
defaultOpenbooleanWhether the dropdown should be open by default.false
onMaxSelected(maxLimit: number) => voidCallback when the maximum number of items is reached.-
onSelectItem(item: MultiSelectItem) => voidCallback when an item is selected.-
onUnselectItem(item: MultiSelectItem) => voidCallback when an item is unselected.-
onOpen(open: boolean) => voidCallback when the dropdown is opened or closed.-