Multi Select

A component that allows users to select multiple options from a list.

lucide-react

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes.com/r/multi-select.json

Examples


Checkbox

Max selected labels and comma separated


API Reference

MultiSelect

PropTypeDefault
placeholderstringSelect...
optionsIOption<{ label: string; value: string; }[]>[]
disablebooleanfalse
checkboxbooleanfalse
selectAllbooleanfalse
maxSelectedLabelsnumber-
commaSeparatedbooleanfalse
groups{ label: string; options: IOption[] }[]-
searchInputPropsReact.ComponentProps<typeof CommandInput>-
notFoundPropsReact.ComponentProps<typeof CommandEmpty>-
defaultValuestring[][]
valuestring[]-
onValueChange(value: string[], options: IOption[]) => void-