ReadonlyisWhether dark mode is currently active (resolved from mode + system preference)
ReadonlyisWhether light mode is currently active
ReadonlysystemWhether the system prefers dark mode
ReadonlythemeCurrent theme mode setting
Reset to system preference
Set the theme mode
The theme mode to set ('light', 'dark', or 'system')
Toggle between light and dark mode If currently in system mode, will switch to the opposite of current resolved theme
Service for managing application theme (light/dark mode).
Note: This service is optional. If you only include the SCSS theme without injecting this service, the theme will still work correctly:
@media (prefers-color-scheme: dark)Use this service when you need:
isDarkMode()signal for conditional UI logictoggleTheme()orsetTheme()Example