Skip to content

Ready-to-use templates for MudBlazor in different styles and layouts with all the basic setup already done for you

License

Notifications You must be signed in to change notification settings

MudBlazor/Templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

604 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

MudBlazor Logo

Blazor Template pre-configured with MudBlazor.

GitHub Discord Twitter Nuget version Nuget downloads

We're excited to announce the availability of a new template for .NET 10 Web Apps: the MudBlazor Web App template. This template is based on the Microsoft Web App template, but has been modified to include MudBlazor components.

Prerequisites

  • .NET 10 SDK
  • Visual Studio 2026, JetBrains Rider or Visual Studio Code

Getting Started

Installation

dotnet new install MudBlazor.Templates

Updating the Template

If you already installed MudBlazor.Templates and want the latest version, update your installed template packages with:

dotnet new update

This checks installed template packages and installs available updates.

To preview updates without changing anything:

dotnet new update --check-only

To verify which versions/templates are installed / available:

dotnet new list mudblazor
dotnet new list mudblazorwasm

If you want to reinstall manually (for example, to pin a specific version), uninstall and install again:

dotnet new uninstall MudBlazor.Templates
dotnet new install MudBlazor.Templates

Install a specific version:

dotnet new install MudBlazor.Templates::<version>

dotnet new update updates all installed template packages, not just MudBlazor.Templates.

Usage

Common Commands

Templates included in this package:

  • mudblazor = MudBlazor Web App (Blazor Web App / interactivity modes)
  • mudblazorwasm = MudBlazor WebAssembly Standalone App

Create a new app (default is Server interactivity):

dotnet new mudblazor -o MyMudApp

Create a static server-rendered app (no interactivity):

dotnet new mudblazor -o MyMudApp -int None

Create an app with per-page interactive components:

dotnet new mudblazor -o MyMudApp -int Auto

Create an app with interactive rendering enabled globally:

dotnet new mudblazor -o MyMudApp -int Auto -ai

Create an app with Individual authentication:

dotnet new mudblazor -o MyMudApp -int Auto -au Individual

Create an app with Individual authentication and global interactivity:

dotnet new mudblazor -o MyMudApp -int Auto -au Individual -ai

Create an app with Individual authentication using LocalDB (instead of SQLite):

dotnet new mudblazor -o MyMudApp -au Individual -uld

Create an empty starter (omit sample/demo pages and styling):

dotnet new mudblazor -o MyMudApp -e

Create an app without HTTPS (for local development only):

dotnet new mudblazor -o MyMudApp --no-https

Create an app with a custom project name and output folder:

dotnet new mudblazor -n Acme.Portal -o src/Acme.Portal -int WebAssembly

Options (Common)

Option Values / Type Default Description / Notes
-int, --interactivity Auto, None, Server, WebAssembly Server Selects the interactive render mode. Use None for static SSR only.
-ai, --all-interactive bool false Applies interactivity globally (root-level). Only enabled when interactivity is not None.
-au, --auth None, Individual None Adds authentication support.
-uld, --use-local-db bool false Uses LocalDB instead of SQLite. Only applies with -au Individual.
-e, --empty bool false Omits sample pages and demo styling.
--no-https bool false Disables HTTPS for local development. Ignored when -au Individual is used.
--exclude-launch-settings bool false Excludes Properties/launchSettings.json from generated output.
--no-restore bool false Skips automatic dotnet restore after project creation.
--use-program-main bool false Generates an explicit Program class and Main method instead of top-level statements.
--localhost-tld bool false Uses the .dev.localhost TLD in the local application URL.

For the complete option list (including advanced template options), run:

dotnet new mudblazor --help

Standalone WASM (mudblazorwasm)

Create a new standalone WebAssembly app:

dotnet new mudblazorwasm -o MyMudWasmApp

Create a standalone WebAssembly app with Individual auth (this also exercises the MissingAuthority guidance by default until provider values are configured):

dotnet new mudblazorwasm -o MyMudWasmApp --auth Individual

Create a standalone WebAssembly app with Azure AD B2C auth:

dotnet new mudblazorwasm -o MyMudWasmApp --auth IndividualB2C

Create a standalone WebAssembly app with single-tenant organizational auth:

dotnet new mudblazorwasm -o MyMudWasmApp --auth SingleOrg

Create a standalone PWA:

dotnet new mudblazorwasm -o MyMudWasmApp --pwa

Create an empty standalone app (omit sample/demo pages and styling):

dotnet new mudblazorwasm -o MyMudWasmApp --empty

Create a standalone app using explicit Program.Main:

dotnet new mudblazorwasm -o MyMudWasmApp --use-program-main

Generate the "Call Web API" sample navigation/page variant (B2C + non-default API settings):

dotnet new mudblazorwasm -o MyMudWasmApp --auth IndividualB2C --called-api-url https://example.com/api --called-api-scopes api.read

For the complete standalone WASM option list, run:

dotnet new mudblazorwasm --help

Visual Studio Templates

The templates can also be used in Visual Studio and should show up in the "Create a new project" template list. Common options map to Visual Studio's project creation UI, but the CLI examples above are the best reference for advanced combinations and flags.

Contributing

Installing directly from Source Code

If you want to test changes to the template source code that haven't been published yet, clone the source code and execute the InstallAndBuildAllTemplates.ps1 powershell script

git clone https://github.com/MudBlazor/Templates.git

If you get an error about the script not being digitally signed use this command to change the security policy for this shell session:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass