Theme
useTheme
Hook returning theme preference, resolved light/dark, setTheme, toggle, and boolean helpers — requires ThemeProvider.
useTheme()
Returns the active ThemeContext value. Throws if called outside ThemeProvider.
import { } from 'manicjs';
export function () {
const { , , } = ();
return (
< ={}>
< ="button" ={() => ('system')}>
Use system
</>
</>
);
}Signature
function useTheme(): ThemeContextValue;Prop
Type
Imports
import { useTheme } from 'manicjs';
import { useTheme } from 'manicjs/theme';