Theme Switch Component

Use qds-theme-switch to control the shared light, dark, and automatic theme state. Preferences persist across page loads and propagate to every switch on the page.

Variants

Each instance is bound to the same global theme manager, so a change in one switch is reflected everywhere else immediately.

Default

Standard toggle with manual theme control and automatic system mode.

Compact

Single-button form for tighter toolbars and utility areas.

Auto Enabled

Initial auto mode state; after interaction it stays synchronized with the shared preference.

Theme State

This page listens for the global qds-theme-change event and reports the resolved theme state below.

Theme Mode Light
Auto Theme Disabled
System Preference Light
Root Attribute light
Waiting for theme changes...

Theme-Aware UI Surface

This sample surface uses only shared design tokens so it changes cleanly with the active theme.

Accent actions, text, borders, and inputs should all remain legible in both light and dark mode.