ThemeToggle
Icon button that switches the theme.
<ThemeToggle variant="button" />Icon button that calls toggleTheme from `useTheme`, with a tooltip naming the theme it switches to. With allowSystem on the ThemeProvider it cycles device, light, dark and shows a monitor icon while following the device. The default button variant is bordered like Button; toolbar is borderless. AppBar and PageLayout can render one through their themeToggle prop.
API
variant'button' | 'toolbar'Default:'button'Bordered button, or borderless toolbar style.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'button' | 'toolbar' | 'button' | Bordered button, or borderless toolbar style. |
See also:AppBarPageLayout