Components/useTheme

useTheme

Read and set the current theme (light, dark, system) with localStorage persistence.

Installation

Usage

API Reference

PropTypeDefaultDescription
theme'light'|'dark'|'system'The currently active theme.
setTheme(t: AtlasTheme) => voidUpdate and persist the theme.