import { CMultiSelect } from '@coreui/react-pro'
// or
import CMultiSelect from '@coreui/react-pro/src/components/multi-select/CMultiSelect'
PropertyDescriptionTypeDefault
allowCreateOptions
4.11.0+
Allow users to create options if they are not in the list of options.boolean-
classNameA string of all className you want applied to the base component.string-
cleanerEnables selection cleaner element.booleantrue
clearSearchOnSelect
4.11.0+
Clear current search on selecting an item.boolean-
disabledToggle the disabled state for the component.boolean-
feedback
4.2.0+
Provide valuable, actionable feedback.ReactNode-
feedbackInvalid
4.2.0+
Provide valuable, actionable feedback.ReactNode-
feedbackValid
4.2.0+
Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, :invalid and :valid.ReactNode-
idThe id global attribute defines an identifier (ID) that must be unique in the whole document.

The name and id attributes for the native select element are generated based on the id property:
-
string-
invalidSet component validation state to invalid.boolean-
label
4.2.0+
Add a caption for a component.ReactNode-
loading
4.11.0+
When set, the options list will have a loading style: loading spinner and reduced opacity.boolean-
multipleIt specifies that multiple options can be selected at once.booleantrue
onChangeExecute a function when a user changes the selected option.(selected: Option[]) => void-
onFilterChange
4.8.0+
Execute a function when the filter value changed.(value: string) => void-
onHideThe callback is fired when the Multi Select component requests to be hidden.() => void-
onShowThe callback is fired when the Multi Select component requests to be shown.() => void-
optionsList of option elements.(Option | OptionsGroup)[]-
optionsGroupsTemplate
4.12.0+
Custom template for options groups.(option: OptionsGroup) => ReactNode-
optionsMaxHeightSets maxHeight of options list.string | numberauto
optionsStyleSets option style.'text' | 'checkbox'checkbox
optionsTemplate
4.12.0+
Custom template for options.(option: Option) => ReactNode-
placeholderSpecifies a short hint that is visible in the search input.stringSelect...
requiredWhen it is present, it indicates that the user must choose a value before submitting the form.boolean-
searchEnables search input element.boolean | 'external'true
searchNoResultsLabelSets the label for no results when filtering.ReactNodeNo results found
selectAllEnables select all button.booleantrue
selectAllLabelSets the select all button label.ReactNodeSelect all options
selectionTypeSets the selection style.'text' | 'counter' | 'tags'tags
selectionTypeCounterTextSets the counter selection label.stringitem(s) selected
sizeSize the component small or large.'sm' | 'lg'-
text
4.2.0+
Add helper text to the component.ReactNode-
tooltipFeedback
4.2.0+
Display validation feedback in a styled tooltip.boolean-
validSet component validation state to valid.boolean-
virtualScroller
4.8.0+
Enable virtual scroller for the options list.boolean-
visibleToggle the visibility of multi select dropdown.booleanfalse
visibleItems
4.8.0+
Amount of visible items when virtualScroller is set to true.number10
On this page