Skip to content

Blazor Component Library based on Material Design principles with an emphasis on ease of use and extensibility

License

Notifications You must be signed in to change notification settings

MudBlazor/MudBlazor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MudBlazor

Material Design components for Blazor

GitHub Workflow Status Codecov Quality Gate Status GitHub GitHub Repo stars GitHub last commit Contributors Discussions Discord Twitter NuGet version NuGet downloads

MudBlazor is an ambitious Material Design component framework for Blazor with an emphasis on ease of use and clear structure. It is perfect for .NET developers who want to rapidly build web applications without having to struggle with CSS and Javascript. MudBlazor, being written entirely in C#, empowers you to adapt, fix or extend the framework. There are plenty of examples in the documentation, which makes understanding and learning MudBlazor very easy.

πŸ“˜ Documentation & Demo

πŸ’Ž Why is MudBlazor so successful?

  • Aesthetic design that follows Material Design principles.
  • Intuitive, consistent component structure.
  • Rich documentation with tons of examples and code snippets.
  • Fully written in C# with minimal JavaScript.
  • Build beautiful UIs without CSS (but fully customizable when needed).
  • No third-party component dependencies – maximum flexibility.
  • Strive for stability with extensive test coverage.
  • Frequent releases so devs get their fixes and features fast.

βš™οΈ Prerequisites

MudBlazor .NET Support
1.x.x - 2.0.x .NET 3.1 Ended 03/2021
5.x.x .NET 5 Ended 01/2022
6.x.x .NET 6, .NET 7, .NET 8 Ended 01/2025
7.x.x .NET 7, .NET 8 Limited
8.x.x .NET 8, .NET 9 βœ”οΈ

Tip

Upgrading? Check our Migration Guide for help with breaking changes.

Warning

  1. Static rendering is not supported - Learn more.
  2. Older browsers may not be supported. Use a modern, up-to-date browser - Blazor supported platforms.

πŸ“Š Repo Stats

Alt

🀝 Contributing

Thanks for wanting to contribute! πŸ‘‹
Contributions from the community are what makes MudBlazor successful.

If you're comfortable with C#, Blazor, JavaScript, or CSS, we'd love your help!
Whether it's fixing bugs, adding features, or improving documentation, every contribution counts.

We aim to review and merge non-breaking pull requests quickly.
For larger features or changes, feel free to chat with us on Discord first to get feedback before diving in.

πŸ“š Check out our contribution guidelines to get started and learn more about how the project works.

πŸš€ Getting Started

We have ready-to-go templates at the MudBlazor.Templates repository, or follow the quick install guide to set things up manually:

πŸ› οΈ Quick Install

Install Package:

dotnet add package MudBlazor

Add to _Imports.razor:

@using MudBlazor

Add to the MainLayout.razor or App.razor:

<MudThemeProvider/>
<MudPopoverProvider/>
<MudDialogProvider/>
<MudSnackbarProvider/>

Add to your HTML head section:

<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />

It's either index.html or _Layout.cshtml/_Host.cshtml/App.razor depending on whether you're running WebAssembly or Server.

Next, add to the default Blazor script at the end of the body:

<script src="_content/MudBlazor/MudBlazor.min.js"></script>

Add to the relevant sections of Program.cs:

using MudBlazor.Services;
builder.Services.AddMudServices();

πŸ”— Full Setup Guide

For more details, see the complete installation guide on our website.

πŸ’» Example Usage

<MudText Typo="Typo.h6">
    MudBlazor is @Text
</MudText>

<MudButton Variant="Variant.Filled" 
           Color="Color.Primary" 
           OnClick="ButtonOnClick">
    @ButtonText
</MudButton>

@code {
    string Text { get; set; } = "????";
    string ButtonText { get; set; } = "Click Me";
    int ClickCount { get; set; }

    void ButtonOnClick()
    {
        ClickCount += 1;
        Text = $"Awesome x {ClickCount}";
        ButtonText = "Click Me Again";
    }
}