onSelect/onChange) now receive a CustomEvent — see the migration notes.Installation
Add the package to your project
Package Manager
CDN
Build Tools
Choose Your Method
Install via npm/pnpm/yarn for build tool integration, or use the CDN for quick prototyping and simple projects.
Zero Configuration
The component registers itself automatically when imported. No additional setup required.
Link the Stylesheet in <head>
The component's styles ship inside the JS (shadow DOM), so they can't apply until the script defines <web-multiselect>. Until then the element collapses, and the page jumps when it loads. style.css reserves the input height in the meantime, but only if it's linked in <head>. Importing it from JS only works when your bundler extracts it into a <link> (e.g. a production build). In dev mode it arrives too late.
To shorten that window, preload the module so it downloads in parallel with the HTML: <link rel="modulepreload" href=".../dist/multiselect.js">.
Basic Usage
Your first multiselect component
HTML
JavaScript
Explanation
Member Properties
Use value-member and display-value-member to map object properties to the component.
Reactive API
Use getValue() and setSelected() to interact with the component programmatically.
Framework Integration
Next Steps
📚 View Examples
Explore comprehensive examples showcasing all features and use cases.
View Examples →🎨 Styling Guide
Customize the appearance with CSS variables, --ms-rem scaling and the base-icon contract.