All projects

HTML semantics for native Avalonia UI

HtmlML

Write familiar HTML-shaped markup and script native Avalonia controls—without embedding a browser.

StatusPreview
TierFlagship
DomainAvalonia
Repositorywieslawsoltes/HtmlML

An HTML-inspired markup system for native Avalonia controls, paired with a reusable JavaScript and TypeScript runtime, DOM-style APIs, events, styling, and Canvas rendering.

HtmlML maps familiar HTML-shaped elements onto native Avalonia controls. Its companion JavaScript.Avalonia runtime adds a Jint engine, DOM traversal and mutation, routed-event bridging, modules, timers, animation frames, TypeScript transpilation, and Canvas APIs without hosting a browser engine.

01

Native HTML-like Avalonia elements

02

CSS-inspired classes and inline styles

03

JavaScript, TypeScript, DOM, and events

04

Canvas 2D and WebGL-oriented scripting

Where it fits.

  • Avalonia teams bringing web markup concepts into native applications
  • Tool authors embedding scriptable native UI surfaces
  • Developers building hybrid C#/JavaScript or TypeScript workflows without a WebView
Avalonia

Native desktop targets

JavaScript

Embedded Jint runtime

TypeScript

Embedded transpilation

NuGet

Publication planned

Real output,
not a mockup.

HtmlML GitHub repository preview
The repository combines the markup system, JavaScript runtime, website sample, native host sample, and interactive playground.

Clear layers.
Replaceable seams.

01

Markup

HTML-like XAML tags map to concrete Avalonia controls and document structure.

02

Style

Classes, inline declarations, stylesheets, and converters apply CSS-inspired values through Avalonia properties.

03

DOM + events

JavaScript.Avalonia exposes visual-tree queries, mutation, event propagation, timers, modules, and native object access.

04

Canvas

2D and WebGL-oriented contexts record drawing commands against Avalonia rendering surfaces.

30+ tagsHTML-shaped element set
DOM-stylequeries, mutation, and events
2D + WebGLCanvas directions
LiveGitHub metadata

One repository.
Multiple serious systems.

Explore the focused capabilities, their package boundaries, architecture, installation, and smallest useful example.

From package
to first frame.

Choose the package workflow used by your repository, then start from the smallest working example. Replace VERSION with the current stable or prerelease version shown on NuGet.

01 · Install
Terminal
git clone https://github.com/wieslawsoltes/HtmlML.git
# Reference src/HtmlML and, optionally, src/JavaScript.Avalonia.
02 · Use · xml
MainWindow.axaml
<html xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<body class="app-body">
<section class="card">
<h1>Hello HtmlML</h1>
<canvas id="draw" width="400" height="200" />
</section>
</body>
</html>

Start focused.
Compose as needed.

The repository is the source of truth.

Use the current documentation and samples, inspect changes, report issues, or support continued open-source maintenance.

Inspector

Search everything.

Loading the index…

move open esc close

Preparing metadata and full-text search…