Extensions.MudBlazor.StaticInput 4.0.0

MudBlazor.StaticInput

MudBlazor.StaticInput

GitHub License GitHub Actions Workflow Status NuGet Version NuGet Downloads

:book: Introduction :book:

MudBlazor.StaticInput is an extension package for the MudBlazor library.

Tailored specifically for Static Server-Side Rendered (static SSR) pages. It offers seamless integration for some of MudBlazor's Component design into your static application pages. Focusing particularly on components designed for forms and edit forms, in situations where interactive components are not feasible. For example, when scaffolding Blazor Identity UI in your application.

Live Demo Application

Static Input Demo

Tip

Default email: demo@static.com
Default pword: MudStatic123!

:thinking: Why MudBlazor.StaticInput? :thinking:

  • Rapid Static SSR Integration: Effortlessly add MudBlazor components to your static SSR pages, saving development time.
  • Focus on Forms: Streamline development of forms and edit forms, for use cases such as Microsoft Identity Login forms.
  • Preserved Look & Feel: Maintains the consistent design and user experience of MudBlazor. Ensuring uniformity across all pages.
  • Maintains Flexibility: By inheriting core MudBlazor components, StaticInput maintains the same flexibility as the original components.

:gift: What's Included :gift:

The set of components and features may extend over time. Currently, StaticInput components include:

MudStaticButton

A Material Design button that supports form actions such as 'submit' and 'reset'
<MudStaticButton Variant="Variant.Filled" Color="Color.Primary">Login</MudStaticButton>

Note: <MudButton> is 100% functional in forms when used correctly. The static component simply assists in assuring the correct usage.

MudStaticCheckBox

Checkboxes are a great way to allow the user to make a selection of choices.
<MudStaticCheckBox @bind-Value="@RememberMe" Color="Color.Success">Remember Me</MudStaticCheckBox>
@code{
    public bool RememberMe { get; set; }
}

MudStaticSwitch

Similar to a checkbox but visually different. The switch lets the user switch between two values with the tap of a button.
<MudStaticSwitch @bind-Value="@RememberMe" Color="Color.Success" UnCheckedColor="Color.Primary">Remember Me</MudStaticSwitch>
@code{
    public bool RememberMe { get; set; }
}

MudStaticTextField

Text field components are used for receiving user provided information
<MudStaticTextField @bind-Value="@Password" 
                    InputType="InputType.Password" 
                    Adornment="Adornment.End" 
                    AdornmentIcon="@Icons.Material.Outlined.Visibility"
                    AdornmentToggledIcon="@Icons.Material.Outlined.VisibilityOff"
                    AdornmentClickFunction="showPassword" />
@code {
    public string Password { get; set; }
}
<script>
    const passwordTimeouts = new WeakMap();
    function showPassword(inputElement) {
        if (!inputElement) return;

        const existingTimeout = passwordTimeouts.get(inputElement);
        if (existingTimeout) clearTimeout(existingTimeout);

        if (inputElement.type === 'password') {
            inputElement.type = 'text';
            const timeoutId = setTimeout(function () {
                inputElement.type = 'password';
                passwordTimeouts.delete(inputElement);
            }, 5000);
            passwordTimeouts.set(inputElement, timeoutId);
        } else {
            inputElement.type = 'password';
            passwordTimeouts.delete(inputElement);
        }
    }
</script>

MudStaticRadioGroup

Radio buttons allow the user to select one option from a set.
<MudStaticRadioGroup @bind-Value="@SelectedOption" Color="Color.Primary">
    <MudStaticRadio Value="@("Option 1")" Color="Color.Secondary">Option 1</MudStaticRadio>
    <MudStaticRadio Value="@("Option 2")">Option 2</MudStaticRadio>
</MudStaticRadioGroup>
@code {
    public string SelectedOption { get; set; } = "Option 1";
}

MudStaticNavDrawerToggle

Open/Close a MudDrawer using a MudIconButton. When added, Responsive drawers also open/close based on page size changes.
<MudStaticNavDrawerToggle id="static-left-toggle" DrawerId="static-mini" Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" />

<MudDrawer id="static-mini" Fixed="false" Elevation="1" Anchor="Anchor.Start" Variant="@DrawerVariant.Mini" ClipMode="DrawerClipMode.Always">
    <MudNavMenu>
        <MudNavLink Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.Store">Store</MudNavLink>
        <MudNavLink Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.LibraryBooks">Library</MudNavLink>
        <MudNavLink Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.Group">Community</MudNavLink>
    </MudNavMenu>
</MudDrawer>

MudStaticNavGroup

Collapse/Expand a MudStaticNavGroup by clicking on its title. Can be nested in a standard MudNavMenu
<MudNavMenu>
    <MudNavLink Href="/dashboard">Dashboard</MudNavLink>
    <MudNavLink Href="/servers">Servers</MudNavLink>
    <MudNavLink Href="/billing" Disabled="true">Billing</MudNavLink>

    <MudStaticNavGroup Title="Settings" Expanded="true">
        <MudNavLink Href="/users">Users</MudNavLink>
        <MudNavLink Href="/security">Security</MudNavLink>
    </MudStaticNavGroup>

    <MudNavLink Href="/about">About</MudNavLink>
</MudNavMenu>

:rocket: Getting Started :rocket:

To start using MudBlazor.StaticInput in your projects, simply install the package via NuGet Package Manager:

dotnet add package Extensions.MudBlazor.StaticInput

Note

MudBlazor should already be setup for your application.

1. Register Services

Ensure MudBlazor services are registered in your Program.cs:

builder.Services.AddMudServices();

2. Automatic Initialization

The library utilizes a Blazor JS initializer to automatically load the necessary client-side logic. No manual script tags are required for the core functionality in Blazor Web Apps.

3. Usage

You can now start using the components in your Static SSR pages. For example, in an Identity login page:

<MudStaticTextField @bind-Value="@Input.Email" Label="Email" For="() => Input.Email" />

No packages depend on Extensions.MudBlazor.StaticInput.

Version Downloads Last updated
4.0.0 1 03/05/2026
4.0.0-beta.3 1 03/05/2026
4.0.0-beta.2 0 03/05/2026
4.0.0-beta.1 0 01/17/2026
3.2.1 0 03/05/2026
3.2.0 0 02/20/2025
3.1.0 0 02/16/2025
3.0.1 0 01/23/2025
3.0.0 0 01/18/2025
3.0.0-beta.2 0 12/28/2024
3.0.0-beta.1 0 12/20/2024
2.1.5 0 10/21/2024
2.1.3 0 10/21/2024
2.1.2 0 08/19/2024
2.1.1 0 07/23/2024
2.1.0 0 07/20/2024
2.0.0 0 06/29/2024
2.0.0-rc.2 0 06/22/2024
1.0.1 0 04/03/2024
1.0.0 0 04/01/2024