Displays an icon button used to toggle between the light and dark theme.
asChildcolorfullyDisabledBy default, the `disabled` prop will use the `aria-disabled` attribute to ensure that content remains focusable and accessible even when in a disabled state. If you are sure you want to disable the button and take measures to ensure its accessibility, you can set this prop to `true` to use the `disabled` attribute instead.
loadingsizethemestringstateAlso supports MarginProps: `m`, `mb`, `ml`, `mr`, `mt`, `mx`, `my`
1 variant found
<ThemeToggle
theme={theme}
onThemeChange={(newTheme) => {
setTheme(newTheme);
trackThemeChanged({ theme: newTheme });
void analytics.identify({
theme: newTheme === 'system' ? resolvedTheme : newTheme,
});
}}
/>Also supports MarginProps: m, mb, ml, mr, mt, mx, my
stateType: "disabled" | "normal" | "loading"Used 1 times across 1 package
1 file