Dark Mode Toggle

Switches between the light and dark variants of the current theme and remembers the choice in the browser. It shows the icon of the mode it switches to.

Example

Source
<RzDarkModeToggle />

<!-- Other icons -->
<RzDarkModeToggle DarkIcon="Lucide.Moon" LightIcon="Lucide.Sun" />

Parameters

ParameterTypeDefaultDescription
DarkIconSvgIconIonicon.MoonOutlineThe icon shown in light mode (it switches to dark).
LightIconSvgIconIonicon.SunnyOutlineThe icon shown in dark mode.