- Android
- iOS
- Web
useNTheme
Read or change the active engine theme.
Engine API useNThemenayan-ui/components
Example.tsx
This hook takes no parameters.
| Name | Type | Details |
|---|---|---|
| setTheme | (theme: NThemeMode) => void | |
| toggleTheme | () => void | Switch to the opposite of the currently resolved light/dark appearance. |
| theme | NThemeMode | Selected preference; use resolvedTheme for the active light/dark appearance. |
| resolvedTheme | "light" | "dark" | |
| systemTheme | "light" | "dark" | |
| isDarkMode | boolean | |
| palette | NThemePalette | Active application tokens, including camelCase aliases of semantic colors. |
| colors | Partial<Record<ComponentThemeColor, string>> | Semantic overrides; unspecified colors retain the renderer's defaults. |