Natrix.JSCore 0.19.0

dotnet add package Natrix.JSCore --version 0.19.0
                    
NuGet\Install-Package Natrix.JSCore -Version 0.19.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.19.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Natrix.JSCore" Version="0.19.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.19.0
                    
#r "nuget: Natrix.JSCore, 0.19.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.19.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.19.0
                    
Install as a Cake Addin
#tool nuget:?package=Natrix.JSCore&version=0.19.0
                    
Install as a Cake Tool

<a href="https://natrix.wiki"><img src="docs/Natrix.Docs.Client/wwwroot/assets/og-image.png" alt="Natrix — reactive web UIs, written in C#." width="100%"></a>

Website and docs: natrix.wiki

Natrix is a .NET framework for building web UIs in C# that run in the browser on WebAssembly. Pages render on the server first, then fine-grained signals update exactly the DOM nodes that changed. There's no virtual DOM, no Razor and no JavaScript to write, and Tailwind CSS is compiled at build time.

Getting started

Install the template and create an app. It writes a server project and a WebAssembly client project into the current directory:

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

The app comes with server-side rendering, client-side routing and Tailwind CSS already wired up. The Quick Start walks through it.

A component is a C# class. Setup runs once, and from then on only the parts that read a signal update:

public class Counter : BaseComponent<NoProps, NoEvents, NoSlots, NoExpose>
{
    protected override IComponent[] Setup(out NoExpose exposed)
    {
        exposed = default;

        var count = new Signal<int>(0);
        var doubled = new Computed<int>(() => count.Value * 2);

        return
        [
            new Button
            {
                Props = new ButtonProps(),
                Events = new ButtonEvents { OnClick = _ => count.Value++ },
                Children = [new DomText { Text = "Click me".ToConstSignal() }],
            },
            new P
            {
                Props = new PProps(),
                Children = [new DomText { Text = new Computed<string>(
                    () => $"{count.Value} × 2 = {doubled.Value}") }],
            },
        ];
    }
}

Packages

Building apps

  • Natrix.Core: the component model, rendering, routing and source generators.
  • Natrix.Signals: the reactive primitives (Signal, Computed, Effect) that drive updates.
  • Natrix.Dom: typed components for HTML elements (Div, A, Input, Select and the rest), rendering both in the browser and on the server.
  • Natrix.Browser: the browser render root and host integration for the WebAssembly client.
  • Natrix.Ssr: server-side rendering for ASP.NET Core hosts, including hydration state and server prefetching.
  • Natrix.TailwindCss: Tailwind CSS compiled by a source generator at build time, with no Node, npm or CLI needed.
  • Natrix.Swr: stale-while-revalidate data fetching, ported from React SWR.
  • Natrix.Composables.Dom: VueUse-style composables, such as UseHead for the document title and meta tags.
  • Natrix.Templates: the dotnet new natrix template.

Browser APIs and interop

  • Natrix.StdWeb: strongly typed C# bindings for standard Web APIs such as the DOM, Fetch, Canvas and WebGL, generated from the W3C WebIDL specifications by Natrix.WebIDLGenerator.
  • Natrix.JSCore: the JavaScript proxy system, type marshalling and low-level interop that StdWeb is built on.

Documentation

Requirements

  • .NET 9.0 or later
  • A browser with WebAssembly support

Building this repository also needs Node.js and npm on PATH: the Tailwind generator bundles its JavaScript from source during the build. Apps that use the packages don't need either.

Status

Natrix is under active development and APIs may still change between releases.

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.19.0 219 10/10/2026
0.18.0 199 10/10/2026
0.17.0 194 10/10/2026
0.16.0 199 10/6/2026
0.15.0 195 10/1/2026
0.14.1 186 9/30/2026
0.14.0 191 9/30/2026
0.2.0 177 7/25/2026
0.1.0 455 7/25/2026