Ballmac UI home

Multi Select

Search and select several options in a Radix popover with native checkboxes and a selection cap.

Share weekly summary

Choose up to three teams.

Installation

$ pnpm dlx shadcn@latest add @ballmac/multi-select

Usage

import { MultiSelect } from "@/components/ballmac/multi-select"

The full example is in the Code tab above.

Examples

States and variants

Filter by status

API reference

PropTypeDefault
options*

Options available for selection.

MultiSelectOption[]—
value

Controlled selected values.

string[]—
defaultValue

Initial values when uncontrolled.

string[][]
onValueChange

Called with all selected values after a change.

(value: string[]) => void—
label

Accessible name of the selector.

string—
placeholder

Placeholder when no option is selected.

string—
maxSelected

Maximum number of selections.

numberNumber.POSITIVE_INFINITY
disabled

Disable the selector.

booleanfalse
name

Name for repeated hidden form inputs.

string—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Enter / SpaceOpens the option popover
Tab / SpaceMoves to and toggles native checkboxes
EscapeCloses the popover

Use with AI

Search and select several options in a Radix popover with native checkboxes and a selection cap. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Multi Select (@ballmac/multi-select) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Choose multiple teammates or categories
  • Filter a list by several states

Not for

  • Use select when only one option is allowed

Registry JSON: https://ui.ballmac.com/r/multi-select.json

Credits

Free to use in personal and commercial projects.