Multi Select

Searchable multi-value select whose field is the combobox input: picked options ride as chips that spring in, glide aside and collapse into a "+N" overflow chip, over a grouped listbox with draw-in check marks, a gliding active row, Select all / Clear actions, a max limit that shakes on refusal, optional creatable options, full keyboard control and controlled/uncontrolled string[] value.

Preview

Multi Select preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/multi-select
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

options
(MultiSelectOption | MultiSelectGroup)[]

Flat options, groups, or a mix.

—
value?
string[]

Controlled selected values.

—
defaultValue?
string[]

Uncontrolled initial values.

—
onValueChange?
((value: string[]) => void)
—
open?
boolean
—
defaultOpen?
boolean
false
onOpenChange?
((open: boolean) => void)
—
max?
number

Most selections allowed. Remaining options disable at the limit.

—
creatable?
boolean

Offer "Create …" when the search matches nothing exactly.

false
onCreate?
((label: string) => string)

Called with the typed label when creating. Return the new option's value (default: the label itself). Created options are kept in the list.

—
maxVisibleChips?
number

Chips shown before collapsing the rest into "+N". Default 3.

3
actions?
boolean

Show the "Select all" / "Clear" bar. Default true.

true
label?
string
—
placeholder?
string
Select…
emptyMessage?
ReactNode
No options found.
disabled?
boolean
false
aria-label?
string
—
className?
string
—

Updated