Skip to content

Multi-Select with Chips

Dark Bootstrap 6 multi-select Combobox where chosen teams appear as removable Chips, with check marks, member totals, keyboard removal and a hidden form value.

Also known as: multi select dropdown, multiple select with tags, select multiple options, dropdown with chips, multi select combobox

Bootstrap 6 Selects Responsive Dark #chips #combobox #dark #multi-select #select

Multi-Select with Chips live demo

Open in new tab

Bootstrap 6 code (HTML, CSS, JS)

A dark sharing panel built on the Bootstrap 6 multi-select Combobox. Teams picked from the menu appear as color-coded Chips with member counts. Each chip has its own remove button, and a summary line totals how many people get access. Use it for permissions, audience pickers, filters or any "choose several" field where users need to see what they selected.

How it works

The toggle button.combobox-toggle.msc-toggle has data-bs-toggle="combobox", data-bs-multiple="true" and data-bs-name="teams". With multiple selection, clicking an option toggles its selected class and aria-selected and the menu stays open. The toggle reads "3 selected", and Bootstrap fills a hidden teams input with a comma-separated list. The .menu has role="listbox" with aria-multiselectable="true". Each .menu-item is a direct child with data-bs-value, data-msc-theme (a Bootstrap theme color) and data-msc-members, plus a .msc-dot, a .menu-item-description and a .menu-item-check.

script.js imports Combobox and runs render() on every change.bs.combobox. render() rebuilds .msc-chips as a list of .chip.msc-chip.theme-* elements, each with a .chip-dismiss button, and updates the people count in .msc-summary. A dismiss button calls deselect(), which clicks the matching option, so Combobox stays the single source of truth for the selection, the toggle text and the hidden input. Focus then moves to the next chip's remove button. Backspace on the closed toggle removes the last team. "Clear all" deselects everything, and "Save access" simulates a request.

Customization

  • --msc-accent and --msc-accent-ink on .msc-root: change the pink accent of the badge, check marks, focus rings and Save button.
  • --msc-bg, --msc-panel and --msc-line on .msc-root: set the page, panel and border colors.
  • data-msc-theme on a .menu-item: use any Bootstrap 6 theme (primary, accent, success, warning, info, danger, secondary) to recolor its dot and chip.
  • data-msc-members on a .menu-item: the number shown in the chip and added to the total.
  • Add or remove selected and aria-selected="true" on options to change the starting selection.
  • Replace the setTimeout in the .msc-save handler with fetch(), sending the hidden teams value.

Use cases

  • Permission and sharing panels: pick several teams and see color-coded chips with member counts
  • Audience pickers: a summary line totals how many people will get access
  • Filter bars: selected options show as removable chips, so users see what is active
  • Admin forms: a hidden comma-separated value submits the chosen teams, with a Clear all button

Accessibility

The menu is a labelled multi-select listbox, and each option reports aria-selected. Arrow keys, Home, End, Enter and Escape work inside the menu. Every chip's remove button has a label such as "Remove Design" and a visible focus ring. After a removal, focus moves to a neighbouring chip or back to the toggle, so it is never lost. A visually hidden role="status" line announces added, removed and saved teams.

Bootstrap 6 notes

Bootstrap 5 offered only a native <select multiple>. Bootstrap 6 adds data-bs-multiple="true" on the Combobox and .chip styles with .chip-dismiss, colored through theme-* classes instead of bg-*/text-bg-*. Menu items must be direct children of .menu for arrow-key navigation in 6.0.0-alpha.1, which also logs a harmless "more than one instance" console warning. This is an alpha release, so APIs may change.

Multi-Select with Chips at a glance

Framework
Bootstrap 6
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 6, Bootstrap Icons
Layout
Responsive, works on mobile, dark design
Category
Selects
License
Free for personal and commercial use

Questions about this template

Can I use the Multi-Select with Chips code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 6 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/css/bootstrap.min.css">
  • <script type="module" src="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">

Built for Bootstrap 6.0.0-alpha.1. Bootstrap 6 ships as an ES module, so its script and this component's JavaScript load with type="module". Alpha releases can still change before the stable version.

Multi-Select with Chips – Bootstrap 6 selects component screenshot
Multi-Select with Chips · Bootstrap 6 Selects

More Selects

Multi-Select Dropdown with Checkboxes – Bootstrap 5 selects preview

Multi-Select Dropdown with Checkboxes

Bootstrap 5 multi-select dropdown with checkboxes, live search, select all and clear, a selected count badge and removable chips.

Country Select with Flags – Bootstrap 6 selects preview

Country Select with Flags

Bootstrap 6 Combobox of countries with emoji flags and dial codes, searchable by name or code, feeding a phone number field and an SMS preview.

Searchable Select with Combobox – Bootstrap 6 selects preview

Searchable Select with Combobox

Bootstrap 6 Combobox time zone picker with live search, grouped options, type-ahead, keyboard navigation and a local-time clock card.

Styled Native Select – Pure CSS selects preview

Styled Native Select

Pure CSS restyle of the native select element with a custom arrow, focus ring, error, success and disabled states, and three sizes.

Searchable Select – Tailwind CSS selects preview

Searchable Select

Accessible Tailwind CSS combobox that filters options as you type, highlights matches and supports full keyboard navigation.