GemDarkModeSwitch
A switch component to toggle between light and dark modes.
Usage Example
package example_basic;
import mc.fenix.basic.GemDarkModeSwitch;
import common.ExamplePage;
import mc.fenix.arrange.GemColumn;
page GemDarkModeSwitchExample() {
@ExamplePage(
component = @GemColumn(components = [
@GemDarkModeSwitch()
]),
basePath = "example_basic",
componentName = "GemDarkModeSwitchExample"
);
}```
## GUI Model
```ts
component GemDarkModeSwitch(
String height = "auto",
String width = "auto",
Event<Void> toggled
)
| Name | Type | Description | Default value |
|---|---|---|---|
height |
String |
Height of the component in px, %, vh. |
"auto" |
width |
String |
Width of the component in px, %, vh. |
"auto" |
toggled |
Event<Void> |
Optional callback that is executed when the theme is toggled. |