Skip to Content
✨ Just dropped my UI Library — still cooking up some magic! Stay tuned & maybe… hire me  or sponsor me 😉 
DocumentationMulti Select

Multi Select

A flexible multi-select dropdown component that allows users to select multiple options from a list. Features smooth animations, keyboard navigation, and customizable display options.

Install Dependencies

npx
quickcode-ui add MultiSelect

Default Usage

Default Multi Select

Grouped Options

Grouped Multi Select

Max Display with Overflow

Max Display Multi Select

Disabled State

Disabled Multi Select

Props

MultiSelect

PropTypeDefaultDescription
valuesstring[][]Controlled array of selected values
defaultValuesstring[][]Default selected values for uncontrolled component
onValuesChange(values: string[]) => void-Callback fired when the selection changes
disabledbooleanfalseWhether the multi-select is disabled
classNamestring-Additional CSS classes for the container

MultiSelectTrigger

PropTypeDefaultDescription
classNamestring-Additional CSS classes for trigger

MultiSelectValue

PropTypeDefaultDescription
placeholderstring”Select options”Placeholder text when no values are selected
maxDisplaynumber3Maximum number of selected values to display
classNamestring-Additional CSS classes

MultiSelectContent

PropTypeDefaultDescription
classNamestring-Additional CSS classes for content

MultiSelectItem

PropTypeDefaultDescription
valuestring-The value of the option
disabledbooleanfalseWhether the item is disabled
classNamestring-Additional CSS classes for the item

MultiSelectGroup

PropTypeDefaultDescription
classNamestring-Additional CSS classes for the group

MultiSelectLabel

PropTypeDefaultDescription
classNamestring-Additional CSS classes for the label

Features

  • Multiple Selection: Select and deselect multiple options with visual feedback
  • Visual Tags: Selected values display as removable tags in the trigger
  • Overflow Handling: Configurable maximum display with “+X more” indicator
  • Grouped Options: Organize options into labeled groups for better UX
  • Smooth Animations: Powered by Framer Motion for fluid open/close transitions
  • Keyboard Accessible: Full keyboard navigation with proper focus management
  • Portal Rendering: Dropdown content renders in a portal to avoid z-index issues
  • Smart Positioning: Automatically positions dropdown based on available space
  • Responsive Design: Adapts beautifully across all device sizes
  • Dark Mode Ready: Built-in support for light and dark themes
Last updated on