Appica UIUI 1.1.0

useTheme

Read and set the active theme.


useTheme reads and sets the active theme. It returns the stored choice, the resolved theme, the OS preference, and a setter - everything you need to build a theme switcher.

Usage

Guard theme-dependent UI with mounted so the first client render matches the server output and you avoid a hydration mismatch:

theme-toggle.tsx

Return value

© 2026 Appica UI. A free component library, crafted by the Appica team.