Component docs
Loading
"use client";
import { TransferList } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
options (required) | readonly ChoiceOption[] | — | Options to choose from. |
defaultValue | readonly string[] | — | Initial value when uncontrolled. |
onValueChange | (value: string[]) => void | — | Called with the new value (only when it changes). |
value | readonly string[] | — | Current value (controlled); null where it means "nothing selected". |
optionsrequiredreadonly ChoiceOption[]
Options to choose from.
defaultValuereadonly string[]
Initial value when uncontrolled.
onValueChange(value: string[]) => void
Called with the new value (only when it changes).
valuereadonly string[]
Current value (controlled); null where it means "nothing selected".
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
const options = [
{ label: "candraw", value: "candraw" },
{ label: "cantext", value: "cantext" },
];
<TransferList options={options} />