百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-multi-select-component

> 前端框架
开源

轻量级 (~5KB 经过 gzip 压缩) 多选下拉组件

387 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

轻量级 (~5KB 经过 gzip 压缩) 多选下拉组件

react-multi-select-component

Simple and lightweight multiple selection dropdown component with checkboxes, search and select-all

✨ Features

  • Zero Dependency
  • Lightweight ( { const [selected, setSelected] = useState([]);

return (

); };

export default Example;


More examples can be found [here ↗](https://react-multi-select-component.pages.dev/)

##  Props

| Prop                  | Description                                                                                                                                       | Type                         | Default        |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | -------------- |
| `labelledBy`          | value for `aria-labelledby`                                                                                                                       | `string`                     |                |
| `options`             | options for dropdown                                                                                                                              | `[{label, value, disabled}]` |                |
| `value`               | pre-selected rows                                                                                                                                 | `[{label, value}]`           | `[]`           |
| `hasSelectAll`        | toggle 'Select All' option                                                                                                                        | `boolean`                    | `true`         |
| `isLoading`           | show spinner on select                                                                                                                            | `boolean`                    | `false`        |
| `shouldToggleOnHover` | toggle dropdown on hover option                                                                                                                   | `boolean`                    | `false`        |
| `overrideStrings`     | [localization ↗](stories/recipes/localization.stories.mdx)                                                                                                    | `object`                     |                |
| `onChange`            | onChange callback                                                                                                                                 | `function`                   |                |
| `disabled`            | disable dropdown                                                                                                                                  | `boolean`                    | `false`        |
| `disableSearch`       | hide search textbox                                                                                                                               | `boolean`                    | `false`        |
| `filterOptions`       | [custom filter options (async supported) ↗](stories/recipes/custom-filter.stories.mdx)                                                                        | `function`                   | Fuzzy Search   |
| `className`           | class name for parent component                                                                                                                   | `string`                     | `multi-select` |
| `valueRenderer`       | [custom dropdown header ↗](stories/recipes/custom-value.stories.mdx)                                                                                          | `function`                   |                |
| `ItemRenderer`        | [custom dropdown option ↗](stories/recipes/custom-item.stories.mdx)                                                                                           | `function`                   |                |
| `ClearIcon`           | Custom Clear Icon for Search                                                                                                                      | `ReactNode`                  |                |
| `ArrowRenderer`       | Custom Arrow Icon for Dropdown                                                                                                                    | `ReactNode`                  |                |
| `debounceDuration`    | debounce duration for Search                                                                                                                       | `number`                     | `300`          |
| `ClearSelectedIcon`   | Custom Clear Icon for Selected Items (Hint: Pass `null` to prevent it from rendering completely)                                                  | `ReactNode`                  |                |
| `isCreatable`         | Allows user to create unavailable option(s) [example ↗](https://react-multi-select-component.pages.dev/?path=/story/creatable--creatable-default) | `boolean`                    | `false`        |
| `onCreateOption`      | allows to override newly created option [example ↗](https://react-multi-select-component.pages.dev/?path=/story/creatable--creatable-custom)      | `function`                   |                |
| `closeOnChangedValue` | automatically closes dropdown when its value is changed                                                                                           | `boolean`                    | `false`        |

##  Changelog

For every release changelog/migration-guide will be available in [releases](https://github.com/hc-oss/react-multi-select-component/releases)

##  Credits

- This project gets inspiration and several pieces of logical code from [react-multiple-select](https://github.com/Khan/react-multi-select/)
- [TypeScript](https://github.com/microsoft/typescript)

##  License

MIT &copy; [harshzalavadiya](https://github.com/harshzalavadiya)

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptcheckboxescomponentdropdownhacktoberfest

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架