Natrix.JSCore 0.2.0

dotnet add package Natrix.JSCore --version 0.2.0
                    
NuGet\Install-Package Natrix.JSCore -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Natrix.JSCore" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Natrix.JSCore" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Natrix.JSCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Natrix.JSCore --version 0.2.0
                    
#r "nuget: Natrix.JSCore, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Natrix.JSCore@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Natrix.JSCore&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Natrix.JSCore&version=0.2.0
                    
Install as a Cake Tool

Natrix

Natrix is a .NET WebAssembly toolkit for building browser applications in C#. It combines a JavaScript interop foundation, generated browser API bindings, and an experimental component layer for reactive UI rendering.

The repository is split into a few focused projects:

  • src/Natrix.JSCore provides the JavaScript proxy system, type marshalling, and low-level interop utilities.
  • src/Natrix.StdWeb contains generated C# bindings for standard Web APIs such as DOM, Fetch, Canvas, WebGL, and related browser interfaces.
  • src/Natrix.Core contains the component model, DOM components, render roots, and feature infrastructure.
  • src/Natrix.Ssr contains server-side rendering helpers for ASP.NET Core hosted Natrix applications.
  • src/Natrix.CoreExample is a browser WebAssembly client app that exercises the Core component layer.
  • src/Natrix.Signals provides reactive primitives used by the component layer.
  • src/Natrix.WebIDLGenerator generates C# bindings from WebIDL definitions.

Documentation

Quick Start

Create a WebAssembly browser project and reference the Natrix package that matches the layer you want to use:

dotnet new wasmbrowser
dotnet add package Natrix.StdWeb

For direct browser API access, initialize StdWeb and get typed proxies for browser globals:

using System.Runtime.InteropServices.JavaScript;
using Natrix.JSCore;
using Natrix.StdWeb;

await StdWebProxyFactory.InitializeAsync();

var window = JSObjectProxyFactory.GetProxy<Window>(JSHost.GlobalThis);
var document = window.Document;

var div = document.CreateElement("div");
div.TextContent = "Hello from Natrix";
document.Body?.AppendChild(div);

See src/Natrix.StdWeb/README.md for the full StdWeb overview. For component-based browser client apps, see src/Natrix.Core/README.md.

You can also bootstrap a docs-style Natrix app (server + client + Tailwind) with the template package:

dotnet new install Natrix.Templates
dotnet new natrix -n MyNatrixApp
dotnet run --project MyNatrixApp/MyNatrixApp.csproj

Examples

The examples directory contains package-based examples:

Run an example from its directory:

cd examples/Natrix.TodoExample
dotnet run

Requirements

  • .NET 9.0 or later
  • Browser with WebAssembly support

Status

Natrix is under active development. APIs may change as the core abstractions, generated bindings, and packaging mature.

License

This project is licensed under the MIT License. See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Natrix.JSCore:

Package Downloads
Natrix.StdWeb

Auto-generated strongly-typed C# wrappers for standard Web APIs (DOM, Fetch, Canvas, WebGL, etc.) for Natrix WebAssembly framework. Based on official W3C WebIDL specifications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 142 7/25/2026
0.1.0 427 7/25/2026