Install MudBlazor.ThemeManager
mainTo use the Theme Manager in your Blazor project, follow these installation steps:
- Install the NuGet package via the .NET CLI:
dotnet add package MudBlazor.ThemeManager - Add the namespace to your
_Imports.razorfile:@using MudBlazor.ThemeManager - Include the required Google Fonts and the Theme Manager CSS in your HTML
<head>section (e.g.,index.html,_Layout.cshtml,_Host.cshtml, orApp.razor):<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" />
dotnet add package MudBlazor.ThemeManager