![]() |
VOOZH | about |
dotnet add package MudBlazor.ThemeManager --version 4.0.0
NuGet\Install-Package MudBlazor.ThemeManager -Version 4.0.0
<PackageReference Include="MudBlazor.ThemeManager" Version="4.0.0" />
<PackageVersion Include="MudBlazor.ThemeManager" Version="4.0.0" />Directory.Packages.props
<PackageReference Include="MudBlazor.ThemeManager" />Project file
paket add MudBlazor.ThemeManager --version 4.0.0
#r "nuget: MudBlazor.ThemeManager, 4.0.0"
#:package MudBlazor.ThemeManager@4.0.0
#addin nuget:?package=MudBlazor.ThemeManager&version=4.0.0Install as a Cake Addin
#tool nuget:?package=MudBlazor.ThemeManager&version=4.0.0Install as a Cake Tool
👁 GitHub
👁 Twitter
👁 Nuget version
👁 Discord
Blazor Theme Manager component for MudBlazor library. Can be used live or during development to fast and easy try out different theme settings.
This component is currently not suitable for production applications, be ready for performance issues, bugs and missing features. Feel free to help improve it.
Install Package
dotnet add package MudBlazor.ThemeManager
Add the following to _Imports.razor
@using MudBlazor.ThemeManager
Add the following to your HTML head section, it's either index.html or _Layout.cshtml/_Host.cshtml/App.razor depending on whether you're running WebAssembly or Server.
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="_content/MudBlazor.ThemeManager/MudBlazorThemeManager.css" rel="stylesheet" />
Add the components in your MainLayout.razor and inside <MudLayout>
<MudThemeManagerButton OnClick="@((e) => OpenThemeManager(true))" />
<MudThemeManager Open="_themeManagerOpen" OpenChanged="OpenThemeManager" Theme="_themeManager" ThemeChanged="UpdateTheme" IsDarkMode="@_isDarkMode" />
Add the following inside your @code for MainLayout.razor
private ThemeManagerTheme _themeManager = new ThemeManagerTheme();
private bool _themeManagerOpen = false;
private bool _isDarkMode;
void OpenThemeManager(bool value)
{
_themeManagerOpen = value;
}
void UpdateTheme(ThemeManagerTheme value)
{
_themeManager = value;
StateHasChanged();
}
protected override void OnInitialized()
{
StateHasChanged();
}
If you need dark mode support, make sure to bind the IsDarkMode parameter to a variable that controls whether your application is in dark mode. This allows the Theme Manager to adjust and display the appropriate palette (light or dark) when you're customizing themes.
The _isDarkMode variable should be synchronized with your MudThemeProvider's IsDarkMode to ensure consistent dark mode behavior across your application:
<MudThemeProvider Theme="_themeManager.Theme" @bind-IsDarkMode="@_isDarkMode" />
Connect the ThemeManagerTheme with MudThemeProvider to control all the theme colors. You can also connect MudAppBar and MudDrawer directly.
<MudThemeProvider Theme="_themeManager.Theme" />
<MudAppBar Elevation="_themeManager.AppBarElevation">
<MudDrawer @bind-Open="_drawerOpen" ClipMode="_themeManager.DrawerClipMode" Elevation="_themeManager.DrawerElevation">
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on MudBlazor.ThemeManager:
| Package | Downloads |
|---|---|
|
FenixAlliance.ACL.Dependencies
Application Component for the Alliance Business Suite. |
|
|
Sufficit.Blazor
Package Description |
|
|
Indiko.Blocks.Widget.UI.Abstractions
Building Blocks Widget UI Abstractions |
|
|
Occasus.BlazorUI
Allows for custom IOption sources, with an interface to edit the settings |
|
|
Sufficit.Blazor.Client
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.0 | 39,339 | 2/22/2026 |
| 3.0.0 | 226,844 | 1/18/2025 |
| 2.1.0 | 88,377 | 9/19/2024 |
| 2.0.0 | 64,031 | 7/1/2024 |
| 1.1.0 | 124,698 | 6/5/2024 |
| 1.0.9 | 59,822 | 3/19/2024 |
| 1.0.8 | 200,360 | 5/15/2023 |
| 1.0.7 | 262,508 | 7/27/2022 |
| 1.0.6 | 615,658 | 2/10/2022 |
| 1.0.5 | 80,966 | 8/10/2021 |
| 1.0.4 | 1,337 | 8/10/2021 |
| 1.0.3 | 10,755 | 6/24/2021 |
| 1.0.2 | 10,606 | 3/8/2021 |
| 1.0.1 | 3,874 | 3/2/2021 |
| 1.0.0 | 2,134 | 3/2/2021 |