Web Multiselect Component
Advanced multiselect web component from @keenmate/web-multiselect (v2.0.0) with virtual
scrolling, search, tree-of-options rendering, and a full-screen mobile overlay. Built as a
framework-agnostic web component with excellent performance.
Key Features: Virtual scrolling (handles 15,000+ options), full keyboard navigation,
multiple display modes, tree / hierarchy mode with cascade checkboxes,
phone full-screen overlay, RTL support, external/async search, and comprehensive
theming via --ms-* / --base-* CSS variables — including
swappable icons through the --base-icon-* tokens.
Basic Multi-Select
Display Modes
Search & Filter
Tree of Options
Give each option a materialized dot-path ("1", "1.1", "1.1.1", …)
and set path-member. Tree mode auto-enables: the component derives parent and depth from
the path and renders the options depth-first, indented by level. The tree is always fully expanded
(no chevron) — reach for @keenmate/web-treeview when you need expand/collapse.
kale → Vegetables → Leafy → Kale (ancestors kept)
getValue(): []
Real Data — Full ISCO-08 Classification
Everything at once on real data: the whole International Standard Classification of
Occupations (ISCO-08) — 619 groups (10 major → 43 sub-major → 130 minor → 436 unit).
The ISCO code is the hierarchy (2211 → path 2.22.221.2211), so it
drops straight into path-member. Only the unit groups (leaves) are
selectable. A getSearchValueCallback widens the filter to match the title, ISCO code,
and full breadcrumb; virtual scroll keeps 600+ rows smooth.
.. /); full breadcrumb in the badge tooltip.
Source: ISCO-08 (© International Labour Organization) — demo data.
Mobile & Fullscreen
On phones the dropdown opens as a full-screen overlay instead of a floating panel —
a touch-friendly sheet with its own search header, big rows, and a close button. The
mobile-presentation attribute (auto | floating |
fullscreen) picks the presentation; auto uses the sheet only on phones.
Because it's usually a phone-only look, each demo offers a Preview as fullscreen toggle so
you can inspect the overlay on desktop.
N of M ↑/↓ navigator to jump.
Grouped Options
Virtual Scrolling (Large Datasets)
RTL (Right-to-Left) Support
Custom Icons
Every built-in glyph is a CSS variable, so re-skinning the picker is pure CSS — no slots, no JS.
One --base-icon-* swap cascades to matching parts:
--base-icon-chevron drives the toggle arrow and the fullscreen pager, while
--base-icon-close covers every ✕ (badge remove, count clear, popover close).
Need finer control? --base-icon-remove (badge ✕), --base-icon-clear
(count clear) and --base-icon-search override individually and win over
--base-icon-close. Each is a full url(...) value — an inline SVG data-URI,
an external file, whatever background-image accepts.
--base-icon-chevron + --base-icon-close → rounded circle chevron and
circle-✕ on every badge remove.
--base-icon-remove is set — a filled square-✕ on badges, while the toggle
chevron keeps the framework default.
--ms-toggle-rotate-closed: 0deg /
--ms-toggle-rotate-open: 180deg — no rotation closed, flips up on open.
Shared Icon Bridge — Pure Admin ↔ Web Component
The --base-icon-* tokens aren't private to the web component — they're a
shared contract. Pure Admin's own controls read the exact same tokens:
the custom .pa-checkbox paints its tick with --base-icon-check (as an
SVG mask), which is the identical glyph <web-multiselect> masks for its
selected rows. So overriding --base-icon-check once on a wrapper
re-skins the framework checkbox and the web component in lockstep — no per-component theming, no JS.
--base-* bridge: it lets shadow-DOM web components and
the SCSS-compiled framework share one theming surface. Pure Admin emits the defaults at
:root via _base-css-variables.scss, so out of the box the picker already
matches the framework's glyphs — this panel just proves the swap propagates to both at once.
Programmatic Control
Events & Callbacks
Resources
- npm Package:
@keenmate/web-multiselect(v2.0.0) - Repository: github.com/keenmate/web-multiselect
- Documentation: See package README and AI instructions in
../../web-multiselect/ai/ - CSS Variables: Uses
--ms-*prefix (component) and--base-*prefix (theme integration) - Custom Icons:
--base-icon-chevron(toggle + pager),--base-icon-close(all ✕), plus granular--base-icon-remove/--base-icon-clear/--base-icon-search; opt out of chevron rotation with--ms-toggle-rotate-closed/open - Theming: Pure Admin provides
--base-*variables viasrc/scss/_base-css-variables.scss