Skip to main content
The MultiSelect component allows users to select multiple options from a dropdown list with support for search, chips display, and select all functionality.

Basic usage

<flx-multiselect
  label="Tags"
  placeholder="Select tags"
  [(ngModel)]="selectedTags"
  [options]="tags">
</flx-multiselect>

Properties

label
string
Label text displayed above the multiselect
placeholder
string
Placeholder text when no options are selected
value
any[]
Array of currently selected values
options
SelectOption[]
required
Array of options to display
disabled
boolean
default:"false"
Disables the multiselect
required
boolean
default:"false"
Marks the field as required
error
boolean | string
default:"false"
Shows error state
searchable
boolean
default:"true"
Enables search/filter functionality
selectAll
boolean
default:"true"
Shows “Select All” option
maxSelections
number
Maximum number of options that can be selected
displayMode
'chips' | 'count' | 'text'
default:"chips"
How selected values are displayed

Events

valueChange
EventEmitter<any[]>
Emitted when selected values change
Emitted when user types in search box

Examples

<flx-multiselect
  label="Skills"
  placeholder="Select your skills"
  [(ngModel)]="selectedSkills"
  [options]="skills">
</flx-multiselect>
export class SkillsSelect {
  selectedSkills = ['js', 'angular'];
  skills = [
    { value: 'js', label: 'JavaScript' },
    { value: 'ts', label: 'TypeScript' },
    { value: 'angular', label: 'Angular' },
    { value: 'react', label: 'React' },
    { value: 'vue', label: 'Vue' }
  ];
}

Styling

flx-multiselect {
  --flx-multiselect-min-height: 40px;
  --flx-multiselect-border-radius: 4px;
  --flx-multiselect-border-color: #d1d5db;
  --flx-multiselect-focus-border-color: #3b82f6;
  --flx-multiselect-chip-background: #dbeafe;
  --flx-multiselect-chip-color: #1e40af;
  --flx-multiselect-chip-remove-hover: #ef4444;
  --flx-multiselect-dropdown-max-height: 300px;
}

Accessibility

The MultiSelect component provides full accessibility support:
  • Keyboard navigation (Arrow keys, Enter, Space, Escape)
  • role="combobox" with aria-multiselectable="true"
  • Chip removal with keyboard (Backspace)
  • Screen reader announcements for selections
  • Focus management

Best practices

  • Use clear, descriptive option labels
  • Enable search for lists with more than 10 options
  • Set maxSelections when there’s a practical limit
  • Use appropriate displayMode based on typical selection count
  • Provide helper text to explain selection limits
  • Consider grouping options by category for large lists
  • Select - Single option selection
  • Checkbox - Alternative for few options

Build docs developers (and LLMs) love