Variables must be set on the
<web-multiselect> element itself (not a wrapper),
because the component uses Shadow DOM. See the
Theming page for
live examples.
How --base-* variables work
Every --ms-* variable resolves through a three-step fallback chain, so you
can theme at whichever level you own:
- Per-instance override β set the
--ms-* variable directly
(e.g. --ms-accent-color: #6366f1). Wins over everything. - Shared base token β if you donβt, it inherits a
--base-* counterpart. Setting --base-accent-color once on :root themes this multiselect and every other Keenmate component
(date-range picker, treeview, β¦) together β a single design-system layer. - Built-in default β with no base layer loaded, a hardcoded fallback
applies. Color defaults are wrapped in
light-dark(), so they adapt to the
pageβs color-scheme automatically.
So --ms-accent-color: var(--base-accent-color, #3b82f6) means: your override β the shared token β a sensible blue. Two base knobs stand out: --base-rem (global sizing β --ms-rem bridges to it) and the --base-icon-* contract (new in v2.0.0), where each glyph
(chevron, checkbox check/dash, β, search/filter, add-new) flows from a --base-icon-* token with a Lucide SVG fallback β point one token at your own
SVG to reskin the glyph across all components.
Scaling & typography
--ms-rem bridges to --base-rem (default 10px) β one knob rescales everything.
| Variable | Type | Default | Description |
|---|
--ms-rem | length | var(--base-rem, 10px) | Global sizing unit. Font sizes are unitless multipliers of this. |
--ms-font-family | font | β | Component font family (inherits --base-font-family). |
--ms-input-font-size | multiplier | β | Input font size (Γ --ms-rem). |
Colors & accent
The accent drives focus borders, checkboxes, selected rows and badges β set --ms-accent-color alone to recolor most of the component. Each falls back to a --base-* token (see the note at the top), then a hardcoded, light-dark()-aware default.
| Variable | Type | Default | Description |
|---|
--ms-accent-color | color | var(--base-accent-color, #3b82f6) | Primary accent β focus border, checkbox fill, selected/matched tint, counter, badge remove. |
--ms-accent-color-hover | color | var(--base-accent-color-hover) | Accent hover state. |
--ms-accent-color-light | color | β | Soft accent tint used behind badges / β+X moreβ / popover header (a light-dark() pair). |
--ms-text-color-1 | color | β | Primary text (headings/labels). --ms-text-color-2/3/4 step down to muted/disabled. |
--ms-border-color | color | var(--base-border-color) | Shared border color for the field, dropdown, groups and checkboxes. One knob for every edge. |
Input / field
| Variable | Type | Default | Description |
|---|
--ms-input-bg | color | β | Field background. |
--ms-input-border | border | β | Field border (shorthand, e.g. 1px solid #cbd5e1). Defaults to 1px solid var(--ms-border-color) β set --ms-border-color to recolor every edge at once. |
--ms-input-border-hover | border | β | Field border on hover. Defaults to 1px solid var(--ms-accent-color). |
--ms-input-border-focus | border | β | Field border on focus. Defaults to 1px solid var(--ms-accent-color). |
--ms-input-border-radius | length | β | Field corner radius. |
--ms-input-padding-h v2.0.0 | length | β | Horizontal field padding (replaces removed --ms-input-padding*). |
--ms-input-gap v2.0.0 | length | β | Spacing between input, counter, clear and toggle. |
--ms-input-current-width | length | β | Resolved field width (drives dropdown/popover default width). |
Options & dropdown
| Variable | Type | Default | Description |
|---|
--ms-dropdown-bg | color | β | Dropdown background. |
--ms-dropdown-width | length | β | Dropdown width (see dropdown-width). |
--ms-option-bg-hover | color | β | Option background on hover/focus. |
--ms-option-bg-selected | color | β | Selected option background. |
--ms-option-min-height | length | β | Minimum option row height. |
--ms-tree-indent v2.0.0 | length | β | Indent step per tree level. |
--ms-tree-base-indent v2.0.0 | length | β | Indent of the first tree level. |
Badges & tooltips
| Variable | Type | Default | Description |
|---|
--ms-badge-bg | color | β | Badge background. |
--ms-badge-text-color | color | β | Badge text color. |
--ms-tooltip-bg | color | β | Shared tooltip background. |
--ms-option-tooltip-bg | color | β | Option tooltip background (overrides shared). |
--ms-option-tooltip-max-width | length | β | Option tooltip max width. |
Transient message / toast (v2.0.0)
The showMessage() toast (also raised by a veto callback returning a reason). Per-variant colors default to --base-* status tones.
| Variable | Type | Default | Description |
|---|
--ms-message-info-bg / --ms-message-info-color v2.0.0 | color | β | Info variant (reuses the tooltip surface). |
--ms-message-warning-bg / --ms-message-error-bg / --ms-message-success-bg v2.0.0 | color | β | Status-tone backgrounds (default to --base-warning/danger/success-bg). |
--ms-message-border-radius / --ms-message-padding v2.0.0 | length | β | Toast shape. |
Icons (base contract, v2.0.0)
Each glyph flows from a --base-icon-* counterpart with a Lucide SVG fallback, so a theme can reskin all Keenmate components at once.
| Variable | Type | Default | Description |
|---|
--ms-icon-chevron v2.0.0 | image | β | Dropdown toggle chevron. |
--ms-icon-check / --ms-icon-indeterminate v2.0.0 | image | β | Checkbox check / dash (mask glyphs). |
--ms-icon-clear / --ms-icon-remove v2.0.0 | image | β | Clear button / badge remove. |
--ms-icon-search / --ms-icon-filter v2.0.0 | image | β | Search / filter glyphs (fullscreen toggle). |
--ms-add-new-* v2.0.0 | various | β | Add-new prompt row styling (--ms-icon-add-new glyph). |