The color-mode control — one source of truth. pill and link toggle between two modes; menu is a split button whose left half toggles and whose right half opens the full list, which is what lets a third mode exist at all.
<button type="button" class="mk-theme-toggle" data-accent-theme-toggle aria-label="Toggle color mode">
<i class="bi bi-moon-stars mk-theme-icon-dark"></i>
<i class="bi bi-sun mk-theme-icon-light"></i>
</button> variant: pill <button type="button" class="btn btn-link p-0 border-0 text-body-secondary text-decoration-none lh-1" data-accent-theme-toggle aria-label="Toggle color mode">
<i class="bi bi-moon-stars mk-theme-icon-dark"></i>
<i class="bi bi-sun mk-theme-icon-light"></i>
</button> variant: link The split button. Left half cycles light and dark as before; the caret opens the list, which is the only way to reach auto or a derived mode.
A site that ships the derived contrast mode offers it here. The mode is CSS in _base.scss; this is the control that makes it selectable.
| Field | Type | Notes |
|---|---|---|
variant |
text | pill (bordered button) · link (plain, for a utility strip) · menu (split button with the full mode list) |
modes |
text | menu variant only — the selections it offers, space separated: light · dark · auto · contrast. Order is the order shown. |
class_names |
text |