Theme Toggle

A button that switches between light and dark mode.

Installation

bash
shellui-native add theme-toggle

Platforms: MAUI · Avalonia. Also installs icon.

Usage

Basic

Rendered with ShellUI for Blazor
<ui:ThemeToggle ThemeChanged="OnThemeChanged" />
Avalonia, running in your browser

From code, ShellTheme does the same:

csharp
ShellTheme.ToggleTheme();
var dark = ShellTheme.IsDarkMode;

API

Event Arguments Description
ThemeChanged bool The theme switched between light and dark.
Method Description
Toggle() Opens it if closed, closes it if open.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.