MudBlazor.ThemeManager 3.0.0

Prefix Reserved
dotnet add package MudBlazor.ThemeManager --version 3.0.0                
NuGet\Install-Package MudBlazor.ThemeManager -Version 3.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MudBlazor.ThemeManager" Version="3.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MudBlazor.ThemeManager --version 3.0.0                
#r "nuget: MudBlazor.ThemeManager, 3.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MudBlazor.ThemeManager as a Cake Addin
#addin nuget:?package=MudBlazor.ThemeManager&version=3.0.0

// Install MudBlazor.ThemeManager as a Cake Tool
#tool nuget:?package=MudBlazor.ThemeManager&version=3.0.0                

<h1> <picture> <source media="(prefers-color-scheme: dark)" srcset="content/MudBlazor-GitHub-NoBg-Dark.png"> <source media="(prefers-color-scheme: light)" srcset="content/MudBlazor-GitHub-NoBg.png"> <img alt="MudBlazor" src="content/MudBlazor-GitHub-NoBg.png"> </picture> </h1>

Theme Manager / Generator for MudBlazor

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.

Workflow

caption

Prerequisites

Installation

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" />

Add the following inside your @code for MainLayout.razor

private ThemeManagerTheme _themeManager = new ThemeManagerTheme();
public bool _themeManagerOpen = false;

void OpenThemeManager(bool value)
{
    _themeManagerOpen = value;
}

void UpdateTheme(ThemeManagerTheme value)
{
    _themeManager = value;
    StateHasChanged();
}

protected override void OnInitialized()
{
    StateHasChanged();
}

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 Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on MudBlazor.ThemeManager:

Package Downloads
FenixAlliance.ACL.Dependencies

Application Component for the Alliance Business Suite.

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

Jakar.Extensions.Blazor

Extensions to aid in development.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 181 1/18/2025
2.1.0 30,907 9/19/2024
2.0.0 25,552 7/1/2024
1.1.0 22,874 6/5/2024
1.0.9 41,392 3/19/2024
1.0.8 155,324 5/15/2023
1.0.7 226,330 7/27/2022
1.0.6 584,123 2/10/2022
1.0.5 74,930 8/10/2021
1.0.4 1,101 8/10/2021
1.0.3 9,857 6/24/2021
1.0.2 9,176 3/8/2021
1.0.1 3,502 3/2/2021
1.0.0 1,367 3/2/2021