UseInitTheme
katanakit-js / useInitTheme
Function: useInitTheme()
Section titled “Function: useInitTheme()”function useInitTheme(options?): void;Defined in: infrastructure/theme/theme.service.ts:116
Initializes the theme system. Reads the stored preference (or falls back
to defaultMode), applies the theme, and registers a system color-scheme
listener for "system" mode.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options? |
ThemeOptions |
Configuration for the theme system. |
Returns
Section titled “Returns”void
Example
Section titled “Example”useInitTheme({ defaultMode: "dark", storageKey: "app-theme", onChange: (mode, resolved) => console.log(mode, resolved),});