# Blazor

> Blazor .NET WebAssembly and Server framework. Use for C# frontend.

- Skill: `g1joshi/blazor` (Agent Skill)
- Install (CLI): `npx skillmds@latest add g1joshi/blazor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/g1joshi/blazor/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: G1Joshi (https://skillmd.com/u/g1joshi)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/g1joshi/blazor

---


# Blazor

Blazor allows writing web UIs in **C#** instead of JavaScript. .NET 9 (2024/2025) brings unified rendering modes (Server, WebAssembly, Auto).

## When to Use

- **.NET Shops**: Sharing code (Models/DTOs) between Backend and Frontend.
- **Internal Apps**: Rapid development for enterprise tools.
- **WebAssembly**: Running compiled C# in the browser.

## Core Concepts

### Blazor Server

UI logic runs on server, updates sent via SignalR. Low latency, requires connection.

### Blazor WebAssembly

Runs client-side (DLLs downloaded). Offline support.

### Interactive Components

Razor syntax (`@code { ... }`) combining HTML and C#.

## Best Practices (2025)

**Do**:

- **Use `Auto` mode**: Load fast (Server), then switch to WASM (Client) in background.
- **Use `QuickGrid`**: High performance data grid component.
- **Use Component Libraries**: MudBlazor/Radzen for material UI.

**Don't**:

- **Don't block the UI thread**: Use `await` for long implementations.

## References

- [Blazor Documentation](https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor)

