ProtectedappliedThe theme that is currently displayed.
Protected ReadonlyapplyThe callback that will be called to apply a new theme.
Protected ReadonlylocalThe default storage, only created when no storage param is given.
Protected ReadonlyremoveA callback to remove the global theme preference listener.
ProtectedselectedThe user's selected theme.
Protected ReadonlystoragePersists the user's selected theme.
ProtectedapplyApply the given selection and fire ViraThemeAppliedEvent if the result changed.
Cleanup internal state and listeners.
The currently selected theme. If you use multiple clients to set the same theme, this might get out of sync.
Tracks the user's ViraThemeSelection and bridges it to a consumer-supplied
applyThemecallback. Persists the selection throughstorage(LocalStorage by default), and listens for system color-scheme changes to re-apply the theme in auto mode without persisting. Listen for ViraThemeAppliedEvent to react to the displayed theme changing.The initial theme is applied during construction.