Gathering detailed insights and metrics for multiselect-react-dropdown
Gathering detailed insights and metrics for multiselect-react-dropdown
Gathering detailed insights and metrics for multiselect-react-dropdown
Gathering detailed insights and metrics for multiselect-react-dropdown
downshift
🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.
wwagner4719-multiselect-react-dropdown
React multiselect dropdown component with search and various features
react-dropdown-select
Customizable dropdown select for react
react-native-element-dropdown
React Native Element Dropdown is a library that provides a customizable dropdown component for React Native applications.
React multiselect dropdown with search and various options
npm install multiselect-react-dropdown
Typescript
Module System
Node Version
NPM Version
TypeScript (79.75%)
JavaScript (7.37%)
HTML (6.52%)
CSS (6.36%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
202 Stars
234 Commits
114 Forks
3 Watchers
7 Branches
16 Contributors
Updated on Mar 18, 2025
Latest Version
2.0.25
Package Id
multiselect-react-dropdown@2.0.25
Unpacked Size
228.40 kB
Size
56.53 kB
File Count
13
NPM Version
6.14.17
Node Version
14.19.3
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
31
💥💥💥 React Library for Component Lazyloading. Tiny and Efficient. Check it Out 💥💥💥
A React component which provides multi select functionality with various features like selection limit, CSS customization, checkbox, search option, disable preselected values, flat array, keyboard navigation for accessibility and grouping features. Also it has feature to behave like normal dropdown(means single select dropdown).
✨ SSR Support
🍃 Light weight
🚀 Typescript
npm install multiselect-react-dropdown
yarn add multiselect-react-dropdown
1import Multiselect from 'multiselect-react-dropdown'; 2 3this.state = { 4 options: [{name: 'Option 1️⃣', id: 1},{name: 'Option 2️⃣', id: 2}] 5}; 6 7<Multiselect 8options={this.state.options} // Options to display in the dropdown 9selectedValues={this.state.selectedValue} // Preselected value to persist in dropdown 10onSelect={this.onSelect} // Function will trigger on select event 11onRemove={this.onRemove} // Function will trigger on remove event 12displayValue="name" // Property name to display in the dropdown options 13/> 14 15onSelect(selectedList, selectedItem) { 16 ... 17} 18 19onRemove(selectedList, removedItem) { 20 ... 21}
Prop | Type | Default | Description |
---|---|---|---|
options | array | [] | Dropdown options |
onSelect | function | func | Callback function will invoked on select event. Params are selectedList & selectedItem |
onRemove | function | func | Callback function will invoked on remove event. Params are selectedList & removedItem |
singleSelect | boolean | false | Make it true to behave like a normal dropdown(single select dropdown) |
selectedValues | array | [] | Preselected value to persist in dropdown |
showCheckbox | bool | false | To display checkbox option in the dropdown |
selectionLimit | number | -1 | You can limit the number of items that can be selected in a dropdown |
placeholder | string | Select | Placeholder text |
disablePreSelectedValues | bool | false | Prevent to deselect the preselected values |
isObject | bool | true | Make it false to display flat array of string or number Ex. ['Test1',1] |
displayValue | string | value | Property name in the object to display in the dropdown. Refer Basic Usage section |
emptyRecordMsg | string | No options available | Message to display when no records found |
groupBy | string | '' | Group the popup list items with the corresponding category by the property name in the object |
closeIcon | string | circle | Option to select close icon instead of default. Refer Close Icon section |
style | object | {} | CSS Customization for multiselect. Refer below object for css customization. |
caseSensitiveSearch | bool | false | Enables case sensitivity on the search field. |
closeOnSelect | bool | true | Dropdown get closed on select/remove item from options. |
id | string | '' | Id for the multiselect container and input field(In input field it will append '{id}_input'). |
className | string | '' | Class for the multiselect container wrapper. |
avoidHighlightFirstOption | bool | false | Based on flag first option will get highlight whenever optionlist open. |
hidePlaceholder | bool | false | For true, placeholder will be hidden if there is any selected values in multiselect |
disable | bool | false | For true, dropdown will be disabled |
onSearch | function | func | Callback function invoked on search in multiselect, helpful to make api call to load data from api based on search. |
loading | bool | false | If options is fetching from api, in the meantime, we can show loading... message in the list. |
loadingMessage | any | '' | Custom loading message, it can be string or component. |
showArrow | bool | false | For multiselect dropdown by default arrow wont show at the end, If required based on flag we can display |
customArrow | any | undefined | For multiselect dropdown custom arrow option |
keepSearchTerm | bool | false | Whether or not to keep the search value after selecting or removing an item |
customCloseIcon | ReactNode or string | undefined | Custom close icon and can be string or react component(Check demo for reference) |
selectedValueDecorator | (string) => ReactNode | string | v => v | A function that can be used to modify the representation selected value |
optionValueDecorator | (string) => string | v => v | A function that can be used to modify the representation the available options |
Ref
as a prop 📌By using React.createRef() or useRef(), able to access below methods to get or reset selected values
Method Name | Description |
---|---|
resetSelectedValues | Programatically reset selected values and returns promise |
getSelectedItems | Get all selected items |
getSelectedItemsCount | Get selected items count |
1constructor() { 2 this.multiselectRef = React.createRef(); 3} 4 5resetValues() { 6 // By calling the belowe method will reset the selected values programatically 7 this.multiselectRef.current.resetSelectedValues(); 8} 9 10<Multiselect 11options={this.state.options} // Options to display in the dropdown 12ref={this.multiselectRef} 13/> 14
1{ 2 multiselectContainer: { // To change css for multiselect (Width,height,etc..) 3 .... 4 }, 5 searchBox: { // To change search box element look 6 border: none; 7 font-size: 10px; 8 min-height: 50px; 9 }, 10 inputField: { // To change input field position or margin 11 margin: 5px; 12 }, 13 chips: { // To change css chips(Selected options) 14 background: red; 15 }, 16 optionContainer: { // To change css for option container 17 border: 2px solid; 18 } 19 option: { // To change css for dropdown options 20 color: blue; 21 }, 22 groupHeading: { // To chanage group heading style 23 .... 24 } 25}
Name | Image |
---|---|
circle | ![]() |
circle2 | ![]() |
cancel | ![]() |
close | ![]() |
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 2/19 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
57 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More