MultiSelect
@stellaria/nebula-webMultiSelectPropsPreview
Props
23| Prop | Type | Default |
|---|---|---|
className | string | — |
data required | readonly SelectOption[] | — |
defaultValue | readonly string[] | [] |
description | ReactNode | — |
disabled | boolean | false |
emptyLabel | string | — |
error | string | boolean | — |
errorDisplay | ErrorDisplay | "tooltip" |
field | NebulaField<string[]> | — |
label | ReactNode | — |
maxDropdownHeight | number | — |
maxValues | number | — |
onChange | ((value: string[]) => void) | — |
placeholder | string | "Select options" |
placement | PopoverPlacement | "bottom start" |
removeLabel | ((option: SelectOption) => string) | (option) => `Remove ${option.label}` |
renderOption | RenderOption | — |
required | boolean | false |
rootClassName | string | — |
searchable | boolean | true |
size | Size | "md" |
surface | FieldSurface | "outline" |
value | readonly string[] | — |
Slot props
14Each one spreads over an inner element, so you can restyle a region without forking the component.
| Prop | Type | Default |
|---|---|---|
bodyProps Wrapper for the control. | BoxSlotProps | — |
chevronProps The chevron of that button. It carries `data-open`, which is where its rotation comes from. | BoxSlotProps | — |
chipLabelProps The label of each tag. | TextSlotProps | — |
chipProps Every tag of a chosen value. It spreads over ALL of them. | BoxSlotProps | — |
chipRemoveProps The cross that removes each tag. Its accessible label comes from `removeLabel`. | UnstyledButtonProps | — |
controlProps The box that groups the tags and the search field. | BoxSlotProps | — |
descriptionProps Help text below the label. Only rendered with `description`. | TextSlotProps | — |
dropdownProps The dropdown, which is the motion wrapper of the floating surface and does not go through `Box`: it does not accept style props. Its width and position are written after the slot and are not overridden; the `style` you pass composes with them. | OverlayMotionSlotProps | — |
errorProps Configures the `FieldError`. With `errorDisplay="tooltip"` it spreads whole; with `"text"` there is no `FieldError` to configure — it is a `Text` with `role="alert"` — and only `className` is honoured. | Omit<FieldErrorProps, "children"> | — |
headerProps The label and description row. Not rendered when the field has neither. | BoxSlotProps | — |
labelProps The field label. It lands on the `<label>`, which already carries the control `htmlFor`. | TextSlotProps | — |
requiredProps The required asterisk, which lives inside the label. Only rendered with `required`. | BoxSlotProps | — |
searchProps The search field. It spreads AFTER the aria combobox props and after the component keyboard handler, so an `onKeyDown` here takes out backspace-to-remove. | Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> | — |
triggerProps The button that opens the list. | UnstyledButtonProps | — |
Also accepts
On top of its own props, this component forwards these groups.