Component docs
Loading
"use client";
import { MultiSelect } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
options (required) | readonly SelectOption[] | — | Options to choose from. |
invalid | boolean | — | Marks the control invalid (aria-invalid); FormField sets it from error. |
onValueChange | ( value: string[], event: ChangeEvent<HTMLSelectElement>, ) => void | — | Called with the new value (only when it changes). |
size | ComponentSize | — | Size from the shared scale (xs, sm, md, lg). |
value | readonly string[] | — | Current value (controlled); null where it means "nothing selected". |
optionsrequiredreadonly SelectOption[]
Options to choose from.
invalidboolean
Marks the control invalid (aria-invalid); FormField sets it from error.
onValueChange( value: string[], event: ChangeEvent<HTMLSelectElement>, ) => void
Called with the new value (only when it changes).
sizeComponentSize
Size from the shared scale (xs, sm, md, lg).
valuereadonly string[]
Current value (controlled); null where it means "nothing selected".
Other props are passed to the root element (SelectHTMLAttributes<HTMLSelectElement>), including className, style, id and aria-* attributes.
const options = [
{ label: "candraw", value: "candraw" },
{ label: "cantext", value: "cantext" },
];
<MultiSelect options={options} />