ColorModeToggle is a dark/light mode switcher component.
It's the component used by ThemeEditorDrawerHeader.
View source
import { ColorModeToggle } from '@hypertheme-editor/chakra-ui'
import { ColorModeToggle } from '@hypertheme-editor-pro/chakra-ui'
| Name | Type | Default | Short Description | 
|---|---|---|---|
| showLabel | boolean | false | Show "light" or "dark" label | 
| size | 'sm' | 'md' | 'lg' | 'md' | Change size of the button | 
This component accepts also StackProps from the Chakra UI Stack component, read more here.
If true it shows a label indicating "light" or "dark".
This prop accepts a boolean value.
Here's an example with the label enabled:
Change the size of the button.
Currently it accepts 'sm' | 'md' | 'lg' value.
Here's an example showing the different sizes:
Prev
Next