useTheme
useTheme():
ThemeContextValue
Defined in: packages/react/src/components/ui/ThemeProvider.tsx:129
Hook to access the current theme and theme setter.
Must be used inside a <ThemeProvider>.
Returns
Section titled “Returns”ThemeContextValue
The theme context value.
Throws
Section titled “Throws”When used outside <ThemeProvider>.
Example
Section titled “Example”const { theme, setTheme } = useTheme();setTheme("dark");