🟣

Blazor

Blazor is Microsoft's framework for building interactive web UIs using C# instead of JavaScript, part of the ASP.NET Core stack. It's the #18 most-used web framework, reported in roughly 7% of developer surveys. Components can run either in the browser via WebAssembly (Blazor WebAssembly) or on the server with UI updates streamed over SignalR (Blazor Server), which makes it the natural choice for .NET shops that want to build modern, componentized web front ends without leaving the C# ecosystem.

Quick facts
Type: Web UI framework (client-side WebAssembly or server-rendered)
Made by: Microsoft
License: Free / open-source (MIT)
Language: C# / .NET
Primary use case: Interactive web apps for teams that want a single C#/.NET codebase across frontend and backend
Jump to: ExampleGetting startedBest for

Example

A Blazor component is a `.razor` file that mixes HTML markup with C# logic in an `@code` block, using data binding directives like `@onclick` and `@bind`.

@* Counter.razor *@
<h3>Counter</h3>
<p>Current count: @count</p>
<button class="btn btn-primary" @onclick="IncrementCount">
  Click me
</button>

@code {
    private int count = 0;

    private void IncrementCount()
    {
        count++;
    }
}

Getting started

Scaffold a new Blazor project with the .NET CLI, choosing either the WebAssembly or Server hosting model.

# create a new Blazor WebAssembly project
dotnet new blazorwasm -o MyBlazorApp

cd MyBlazorApp
dotnet run
Best for: Internal tools, admin dashboards, and line-of-business web apps built by teams already invested in .NET, who want one language and one set of skills across both the server and the browser UI.