Atelier UI

搜索组件…

搜索组件…

Multi Select

支持搜索、可删除标签、键盘操作和最大选择数的多选下拉框。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

MultiSelectProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"div">, "onChange" | "defaultValue">

属性类型默认值说明
options* 必填MultiSelectOption[]——
valuestring[]——
defaultValuestring[][]—
onValueChange(value: string[]) => void——
placeholderstring"Select options…"—
emptyTextstring"No matching options."—
maxnumber—Maximum number of selectable options
disabledbooleanfalse—
defaultOpenbooleanfalseOpens without moving focus, handy for static previews

安装

$ npx shadcn@latest add https://chromotion.dev/r/multi-select.json

同类组件