# dotnet/blazor

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/dotnet-blazor).**

9,276 stars · 643 forks · PowerShell · Apache-2.0 · archived

## Links

- GitHub: https://github.com/dotnet/blazor
- Homepage: https://blazor.net/
- awesome-repositories: https://awesome-repositories.com/repository/dotnet-blazor.md

## Description

Blazor is a .NET framework for building interactive web user interfaces using C# instead of JavaScript. It provides a component-based UI composition model where reusable, self-contained UI elements are built with C# logic and Razor markup, supporting nesting, parameters, and lifecycle events. The framework offers two primary rendering models: a client-side runtime that compiles C# to WebAssembly and executes directly in the browser, and a server-side model that renders UI on the server and sends incremental DOM updates over a persistent SignalR connection.

A central capability of Blazor is its JavaScript interop bridge, which enables bidirectional communication between .NET and JavaScript. This includes invoking JavaScript functions from .NET, calling .NET methods from JavaScript (including synchronous calls on WebAssembly), and managing object references, stream transfers, and byte array transfers without Base64 encoding overhead. The framework also supports loading JavaScript from standard ES modules to keep component dependencies self-contained and avoid global namespace pollution.

Beyond web development, Blazor extends to cross-platform .NET UI development by embedding components inside native desktop or mobile apps using an embedded web view control with a local interop channel. The framework includes ahead-of-time IL trimming to reduce published application size, with configurable granularity and the ability to preserve types and parameter names for reflection-dependent code. Code can be shared across .NET platforms by referencing libraries that conform to a common standard, enabling consistent business logic across web, desktop, and mobile projects.

## Tags

### User Interface & Experience

- [Reusable UI Components](https://awesome-repositories.com/f/user-interface-experience/reusable-ui-components.md) — Provides a component-based UI composition model with reusable self-contained elements using C# and Razor markup. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/))
- [HTML Element References](https://awesome-repositories.com/f/user-interface-experience/component-architectures/html-element-wrappers/html-element-references.md) — Captures references to rendered HTML elements and passes them to JavaScript for direct DOM manipulation. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet))
- [Embedded Web View Hosts](https://awesome-repositories.com/f/user-interface-experience/native-ui-component-libraries/web-based-native-ui/embedded-web-view-hosts.md) — Embeds Blazor components inside native desktop or mobile apps using an embedded web view control with a local interop channel. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/))

### Programming Languages & Runtimes

- [JavaScript Interop](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-interop.md) — Ships a bidirectional JavaScript interop bridge for calling functions, streaming data, and managing object references between .NET and JavaScript.
- [Byte Array Transfers](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-interop/byte-array-transfers.md) — Provides efficient byte array transfer between .NET and JavaScript without Base64 encoding overhead. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-dotnet-from-javascript))
- [IL Trimming](https://awesome-repositories.com/f/programming-languages-runtimes/ahead-of-time-compilation/il-trimming.md) — Ships an IL trimmer that removes unused code from published assemblies to reduce download size.
- [Static Method Invocations from JavaScript](https://awesome-repositories.com/f/programming-languages-runtimes/class-method-definitions/static-methods/static-method-invocations-from-javascript.md) — Allows calling public static .NET methods from JavaScript by specifying assembly and method identifiers. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-dotnet-from-javascript))
- [Instance Method Invocations from JavaScript](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-interop/instance-method-invocations-from-javascript.md) — Enables calling public instance methods on .NET objects from JavaScript via object references. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-dotnet-from-javascript))
- [JavaScript Object Instantiation](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-interop/javascript-object-instantiation.md) — Instantiates JavaScript objects from .NET using constructor functions and returns handles for further interaction. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet))
- [JavaScript Object References](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-interop/javascript-object-references.md) — Creates references to non-serializable JavaScript objects for use in .NET code via IJSObjectReference. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-dotnet-from-javascript))
- [Module-Loaded JavaScript Isolation](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-interop/module-loaded-javascript-isolation.md) — Loads JavaScript from standard ES modules to avoid global namespace pollution and keep component dependencies self-contained. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet))
- [Synchronous JavaScript Invocations](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-interop/synchronous-javascript-invocations.md) — Calls JavaScript synchronously from client-side WebAssembly components via IJSInProcessRuntime, reducing overhead. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet))
- [Synchronous .NET Method Invocations](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-interop/synchronous-net-method-invocations.md) — Ships a synchronous interop path for calling .NET methods from JavaScript on WebAssembly, reducing overhead. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-dotnet-from-javascript))

### Web Development

- [C# Web Frontends](https://awesome-repositories.com/f/web-development/c-web-frontends.md) — Creates client-side web interfaces using C# instead of JavaScript, enabling full-stack .NET development in the browser. ([source](https://cdn.jsdelivr.net/gh/dotnet/blazor@master/README.md))
- [Client-Side WebAssembly Rendering](https://awesome-repositories.com/f/web-development/client-side-webassembly-rendering.md) — Blazor downloads a runtime compiled to WebAssembly and executes code directly in the browser to handle UI rendering and interactions. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/))
- [Component-Based Web Frameworks](https://awesome-repositories.com/f/web-development/component-based-web-frameworks.md) — Creates reusable, self-contained UI components with C# logic and HTML markup for composable web applications.
- [Cross-Platform UI Frameworks](https://awesome-repositories.com/f/web-development/cross-platform-ui-frameworks.md) — Provides a framework for building reusable UI components that run across browser, desktop, and mobile via embedded web views.
- [Server-Side Rendering](https://awesome-repositories.com/f/web-development/server-side-rendering.md) — Renders UI on the server and updates the browser over a real-time connection, reducing client-side processing.
- [Server-Side Rendering Frameworks](https://awesome-repositories.com/f/web-development/server-side-rendering-frameworks.md) — Renders UI on the server and sends incremental DOM updates over a real-time SignalR connection.
- [Real-Time DOM Updates](https://awesome-repositories.com/f/web-development/server-side-rendering/real-time-dom-updates.md) — Renders UI on the server and sends incremental DOM updates over a persistent real-time SignalR connection.
- [Single-Page Applications](https://awesome-repositories.com/f/web-development/single-page-applications.md) — Builds interactive client-side web UIs using C# and WebAssembly instead of JavaScript.
- [WebAssembly Frameworks](https://awesome-repositories.com/f/web-development/webassembly-frameworks.md) — Compiles C# code to WebAssembly to run UI components directly in the browser.
- [.NET Runtime Compilations](https://awesome-repositories.com/f/web-development/webassembly-runtimes/net-runtime-compilations.md) — Downloads a .NET runtime compiled to WebAssembly and executes C# code directly in the browser for UI rendering.
- [Embedded Web Views](https://awesome-repositories.com/f/web-development/embedded-web-views.md) — Embeds Blazor components inside native desktop or mobile apps using an embedded web view control.

### Part of an Awesome List

- [Byte Array Transfers](https://awesome-repositories.com/f/awesome-lists/data/serialization-and-encoding/array-serialization/primitive-array-encoding/byte-array-transfers.md) — Transfers byte arrays between .NET and JavaScript without Base64 encoding, reducing serialization overhead. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet))

### Software Engineering & Architecture

- [Unreferenced Code Cleaning](https://awesome-repositories.com/f/software-engineering-architecture/bytecode-manipulation/unreferenced-code-cleaning.md) — Removes unreferenced intermediate language code from published assemblies to reduce application size. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/configure-trimmer))
- [Multiplatform Code Sharing](https://awesome-repositories.com/f/software-engineering-architecture/cross-platform-development/multiplatform-code-sharing.md) — Shares C# code and UI components across web, desktop, and mobile platforms using a common library standard. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/))
- [Externally-Rendered UI Embeds](https://awesome-repositories.com/f/software-engineering-architecture/integration-interfaces/ui-component-integrations/external-component-integration/externally-rendered-ui-embeds.md) — Embeds externally-rendered UI content from JavaScript libraries into Blazor components via placeholder elements. ([source](https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/call-javascript-from-dotnet))
