SelectUnstyled API
想要学习更多组件属性和 CSS API,可以查阅 React SelectUnstyled 组件的 API 文档。
导入
import SelectUnstyled from '@mui/base/SelectUnstyled';
// 或
import { SelectUnstyled } from '@mui/base';The foundation for building custom-styled select components.
属性
原生(Native) 组件的属性也是可用的。
| 名称 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| autoFocus | bool | false | |
| components | { Listbox?: elementType, Popper?: elementType, Root?: elementType } | {} | |
| componentsProps | { listbox?: object, popper?: object, root?: object } | {} | |
| defaultListboxOpen | bool | false | |
| defaultValue | any | ||
| disabled | bool | false | |
| listboxOpen | bool | undefined | |
| onChange | func | ||
| onListboxOpenChange | func | ||
| renderValue | func | ||
| value | any | The selected value. Set to null to deselect all options. |
ref 则会被传递到根元素中。