Introduction
Blazor lets you build interactive web UIs using C# instead of JavaScript. A page is a component; components nest to form your app.
A component
Components live in .razor files. Markup and C# mix freely; @code { } holds the logic.
<h1>Counter</h1>
<p>Current count: @count</p>
<button @onclick="Increment">Click me</button>
@code {
private int count = 0;
private void Increment() => count++;
}Render modes
In .NET 8 a component can render statically, on the server (interactive via SignalR), or in WebAssembly. You opt in per-component with @rendermode.