Shopware Design

Theme Select

Usage

Theme Select lets users choose the application color theme: light, dark, or following the operating system preference. Use it in settings screens, profile pages, or anywhere a theme preference belongs. It is a controlled component: it only reports the chosen theme through v-model and does not apply or persist the theme itself, which keeps the host application in charge of how the choice takes effect.

import { MtThemeSelect } from "@shopware-ag/meteor-component-library";

Examples

Pairing with useTheme

The useTheme composable resolves the system option against prefers-color-scheme, applies the resolved value as data-theme, and persists the choice. Binding its theme ref to the select is all a typical app needs.

API reference

Props

PropTypeDefault
label
The label for the select field itself.
string
disabled
Disables the select field.
false | true
model-valueany"system"

Events

EventPayload
update:modelValue[value: Theme]

Best practices

Do
  • Default to system so the application respects the operating system preference.
  • Pair the select with useTheme so the choice is applied and persisted consistently.
  • Give the field a label that describes the setting, such as Color theme or Appearance.
Don't
  • Do not use Theme Select for unrelated multi-option settings; it is purpose-built for color themes.
  • Do not apply the theme from multiple places at once. Keep one owner for the data-theme attribute.

Behavior

  • Theme Select accepts and emits one of three values through modelValue: "light", "dark", or "system", and defaults to "system".
  • The component is purely presentational. Resolving system, writing data-theme, and persisting the choice is the host's responsibility, which useTheme handles out of the box.
  • Option labels are localized (English and German) through the library's i18n setup.
  • Additional Select props such as small or error fall through to the underlying select.

Accessibility

  • Keyboard and screen reader behavior follow the underlying Select component.
  • Each option is labelled with text, so the choice never relies on color or iconography.
  • Provide a visible label so the setting is announced with its purpose.
  • Select: the general-purpose select this component builds on, for arbitrary option sets.
  • useTheme: the composable that resolves, applies, and persists the theme this component selects.