Theming is done entirely through CSS custom properties β there are no styling
attributes. Because the component lives in a Shadow DOM, variables must be set on
the <web-multiselect> element itself (or a theme layer above it),
never on an inner wrapper.
--ms-remis the global sizing unit. It bridges to--base-rem(default10px), so a single knob rescales the input, options, checkboxes, badges and dropdown together. Font sizes are unitless multipliers of it (e.g.1.4 Γ --ms-rem).- Colors, borders and radii are per-concern
--ms-*variables that default to--base-*tokens, so a design system can theme every Keenmate component at once. - Icons flow from a
--base-icon-*contract (new in v2.0.0) with a Lucide SVG fallback β swap one token and the chevron, checkbox glyphs and every β reskin centrally.
TH01 Live theming
Drag the sliders and pick an accent β the variables are written straight onto the element, and the CSS snippet below updates to match.
Open the dropdown to see the accent carry into hover, selected rows and the checkboxes.
--base-checkbox-scale when set on a theme layer.CSS variables reference
A curated selection grouped by concern. See the full CSS variables reference for the complete list.
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). |
--ms-checkbox-scale v2.3.0 | number | var(--base-checkbox-scale, 1) | Scales the option checkbox independently of --ms-rem. Bridges to --base-checkbox-scale, so one theme-layer knob sizes checkboxes across every Keenmate component. The box width/height, border width (--ms-checkbox-border-width-scaled) and corner radius all scale together via calc β not a transform β so the masked check/dash stays crisp and centred at any scale. |
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. |
--ms-group-label-* | various | β | Group header styling β --ms-group-label-color, -font-size, -font-weight, -padding, -transform, -letter-spacing. v2.2.0: the per-group selected-count chip reuses the in-input counterβs --ms-counter-* variables and inherits the group-label font-size, so theming the counter themes both and the chip scales with the header (incl. the phone fullscreen overlay). |
--ms-option-icon-size / --ms-option-content-gap v2.5.0 | length | β | The option icon slot box (width & height) and the gap between the icon and the label β both scale with --ms-rem (defaults calc(2 * --ms-rem) and calc(0.8 * --ms-rem)). --ms-option-icon-size is also the fixed gutter width when reserve-icon-slot is on. |
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). |