MatBlazor components installation

AspNet Core – Server side Blazor framework


If you need open source components for Blazor you definitively need to look at MatBlazor component library.


  • MatBlazor nuget library
  • EmbeddedBlazorContent nuget library (for server side blazor projects)


Configure method

// Embedded blazor content get static content from depended DLLs 


Add additional “using” statement for MatBlazor

@using MatBlazor


@addTagHelper *, MatBlazor
@using EmbeddedBlazorContent

    <!-- static resources from dependent blazor libraries -->

Application bar sample

In the NavMenu.razor file add:

    <MatAppBar Fixed="true">
                <MatIconButton Icon="menu"></MatIconButton>
                <MatAppBarTitle>Trade scanner</MatAppBarTitle>
            <MatAppBarSection Align="@MatAppBarSectionAlign.End">
                <MatIconButton Icon="favorite"></MatIconButton>

After compile your application should look something like :

Blazor components are encoded without namespaces, it means @addTagHelper and @using statements are in place and working.

2 Replies to “MatBlazor components installation”

  1. Preview 8 with matBlazor 1.6 and embeddedblazorContent 1.4
    I really can’t get it working

    The following line in the configure method : app.UseEmbeddedBlazorContent(typeof(MatBlazor.BaseMatComponent).Assembly);

    PS C:\Users\X\Blazor Projects\WebApplication2> dotnet run
    Startup.cs(37,17): error CS1061: ‘IApplicationBuilder’ does not contain a definition for ‘UseEmbeddedBlazorContent’ and no accessible extension method ‘UseEmbeddedBlazorContent’ accepting a first argument of type ‘IApplicationBuilder’ could be found (are you missing a using directive or an assembly reference?) [C:\Users\X\Blazor Projects\WebApplication2\WebApplication2.csproj]

  2. With Preview 7 and MatBlazor 1.3.0

    Shared\NavMenu.razor(35,39,35,60): error CS0103: The name ‘MatAppBarSectionAlign’ does not exist in the current context

Leave a Reply

Your email address will not be published.