Carregando…
Carregando…
Carregando…Searchable multi-select with tag chips, keyboard nav, max selection and clear button.
$ npx kikitocn add multi-select@/lib/utilsimport { MultiSelect } from "@/components/ui/cn/multi-select/MultiSelect";
export function MultiSelectExample() {
return (
<MultiSelect />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
options* | MultiSelectOption[] | — | Lista de opções: { value, label, disabled? } |
value | string[] | undefined | Valores selecionados (controlled) |
defaultValue | string[] | [] | Valores iniciais (uncontrolled) |
onChange | (value: string[]) => void | undefined | Callback quando a seleção muda |
placeholder | string | 'Select options…' | Texto placeholder |
size | 'sm' | 'md' | 'lg' | 'md' | Tamanho do input |
disabled | boolean | false | Desabilita o campo |
maxSelected | number | undefined | Limite máximo de seleções |
searchable | boolean | true | Habilita filtro por texto |
clearable | boolean | true | Exibe botão para limpar toda a seleção |
Multi Select — select multiple values
Selected: react, typescript