ThemeToggle
ThemeToggle(
props):Element
Defined in: packages/react/src/components/ui/ThemeToggle.tsx:32
Theme toggle dropdown component.
Framework-agnostic (no next-themes dependency). Toggles between light,
dark, and system themes. Renders a button with sun/moon icons and a dropdown
menu with three options.
Must be rendered inside a <ThemeProvider>.
Parameters
Section titled “Parameters”DetailedHTMLProps<HTMLAttributes<HTMLDivElement>>
Standard div props (forwarded to wrapper).
Returns
Section titled “Returns”Element
A dropdown button that controls the theme.
Example
Section titled “Example”<ThemeProvider> <ThemeToggle className="ml-auto" /></ThemeProvider>