dotnet-websharper/ui
37.5
Weak · 3 October 2026
26.9k
lines of production code
F#
primary language
2
measurements over time
What this system is
This system is a web UI framework, WebSharper.UI, that enables the construction of client and server-side interfaces using both F\# and C\#. It provides a comprehensive set of features including reactive data primitives, a built-in animation engine, and a flexible templating system that supports both compile-time source generation and runtime HTML parsing. The framework integrates tightly with the .NET ecosystem, offering type-safe combinators for HTML/SVG elements and robust routing capabilities.
Features
Add C\# templating support and migrate test projects to .NET 8
This change introduces a new C\# templating capability by adding the WebSharper.UI.CSharp.Templating.Build, Generator, and main library projects, which enable server-side template compilation for C\#. It also migrates the WebSharper.UI test suite and related test projects (including C\# templating tests) to target .NET 8, ensuring compatibility with the latest runtime while maintaining support for netstandard2.0 in the core libraries.
(dependencies) · high confidence
Automated generation of HTML/SVG element and attribute combinators
The \tools/UpdateElems.fsx\ script now generates F\# code for HTML and SVG elements, attributes, and event handlers by parsing \tags.csv\ from the WebSharper core library. This automation ensures that the UI combinators in \HTML.fs\ stay synchronized with the official tag and attribute definitions, reducing manual maintenance and keeping the API consistent with the underlying WebSharper standards.
tools · high confidence
C\# API surface for WebSharper.UI
This location provides the C\#-friendly extension methods and wrappers for the WebSharper.UI library. It exposes client-side and server-side HTML element creation, event handlers, and input controls (Doc.Client, Doc.Server, HTML.Client, HTML), along with reactive primitives like Flow, Animation, and ListModel, enabling C\# developers to build UIs using idiomatic C\# syntax (e.g., Func delegates) instead of F\#-specific patterns.
WebSharper.UI.CSharp · high confidence
Introduce DynamicTemplate for runtime HTML templating
The WebSharper UI templating runtime now includes a new DynamicTemplate type that allows creating templates from HTML strings at runtime. This enables filling template holes with .With() and finalizing with .Doc(), providing a more flexible approach to template instantiation compared to compile-time only approaches.
WebSharper.UI.Templating.Runtime · high confidence
Introduction of C\# templating code generator
The WebSharper UI library now includes a new C\# templating engine, implemented in the WebSharper.UI.CSharp.Templating module. This feature allows developers to define HTML templates in C\# files, which are then processed by a new CodeGenerator to produce optimized, type-safe C\# code for rendering UI components. The generator handles various template holes (attributes, documentation, events, variables) and supports both client-side and server-side rendering modes, enabling more efficient and maintainable web application development within the WebSharper ecosystem.
WebSharper.UI.CSharp.Templating · high confidence
Introduction of WebSharper.UI.Templating.Common with HTML5 template support
The WebSharper.UI.Templating.Common library has been introduced, providing the core AST, parsing, and settings for the templating engine. This update adds support for HTML5-based templates, including new attributes such as ws-anchor, ws-dom, and ws-onafterrender, and enables server-side .OnAfterRender() handling. It also standardizes input naming, adds multiple select support, and fixes issues with nested template instantiation and style/meta tag ordering.
WebSharper.UI.Templating.Common · high confidence
Introduction of client-side animation and transition system
The WebSharper.UI library now includes a built-in animation engine, exposing types like \Anim\, \Easing\, and \Trans\ to define and play animations. This capability is integrated into the attribute system via new \Animated\, \AnimatedStyle\, and \DynamicClassPred\ attributes, allowing developers to animate DOM property changes, style updates, and CSS class toggles. The \Doc\ module also exposes \UseAnimations\ to globally enable or disable this behavior, and the underlying \Doc\ rendering engine now supports synchronizing animated attribute changes.
WebSharper.UI · high confidence
Introduction of new HTML5-based templating provider
The templating system now supports a new HTML5-based template engine alongside the existing XML-based one. This change introduces a new \TemplatingProvider\ that parses HTML5 templates, enabling features such as \ws-anchor\ attributes for element referencing, server-side event handlers like \ws-onafterrender\, and typed event passing for interactions like \ws-onclick\. The provider also supports dynamic template binding via \.With()\ and \.Bind()\ methods, allowing templates to be applied to documents with reactive variables and unfilled holes managed on the server or client side.
WebSharper.UI.Templating · high confidence
New MSBuild task for C\# templating code generation
A new MSBuild task (\WebSharperUICSharpGeneratorTask\) has been added to handle the generation of C\# code-behind files from HTML templates. This task integrates with the build process to read HTML content, generate corresponding C\# source files using the WebSharper C\# templating engine, and output them for compilation. It includes logic to avoid rewriting unchanged files and correctly resolves output paths relative to the project directory.
WebSharper.UI.CSharp.Templating.Build · high confidence
New internal utility modules for DOM manipulation and data structures
The WebSharper.UI/Utility area now includes several new internal modules to support the UI framework's core operations. DomUtility provides low-level DOM helpers, including specific handling for SVG class attributes (using getAttribute/setAttribute instead of className) and HTML parsing via ParseHTMLIntoFakeRoot. AppendList introduces an efficient append-only list structure for building collections, while Trie provides a lookup structure for routing. Abbrev adds general-purpose array, list, and hash set utilities, and Fresh generates unique IDs. These changes are internal implementation details and do not expose new public APIs.
WebSharper.UI/Utility · high confidence
Behavioural changes
C\# templating now uses an incremental source generator
The C\# HTML templating system has been replaced with an incremental source generator (implementing Microsoft.CodeAnalysis.IIncrementalGenerator). This change shifts how HTML templates are processed: instead of traditional compilation steps, the generator now scans for .html files, combines them with the assembly name to determine namespaces, and produces corresponding .g.cs source files at build time. This should result in faster build times and better integration with the Roslyn compiler pipeline for C\# projects using WebSharper UI.
WebSharper.UI.CSharp.Templating.Generator · high confidence
WebSharper.UI.Next renamed to WebSharper.UI with updated documentation
The project has been renamed from WebSharper.UI.Next to WebSharper.UI. This change is reflected in the README, which updates the title and description, and in the solution file, which now references projects such as WebSharper.UI, WebSharper.UI.CSharp, and WebSharper.UI.Templating. A new CONTRIBUTING.md guide has been added to assist with development setup, and the .gitignore file has been updated to exclude build artifacts and IDE-specific files.
(repo-wide) · high confidence
Test coverage
Add templating test suite with SPA entry point and HTML templates; Added C\# test project for WebSharper.UI; Added HTML test harness for UI templating tests; Added WebSharper.UI.Routing.Tests project; Added server-side C\# templating test project; Added server-side templating test suite; Initial test suite for WebSharper.UI.
Dependencies
Updated NuGet packaging templates for WebSharper.UI and WebSharper.UI.CSharp
The NuGet packaging configuration for WebSharper.UI and the newly introduced WebSharper.UI.CSharp has been updated. The WebSharper.UI package now explicitly includes templating runtime assemblies and F\# 4.1 type provider references (including HtmlAgilityPack and core WebSharper libraries) in addition to the main UI library. The new WebSharper.UI.CSharp package provides C\# extensions and integrates C\# templating build tools and analyzers, targeting netstandard2.0 and depending on the specific WebSharper and WebSharper.UI versions.
nuget · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 37 → 38 (+0.5)
- Rubric changed (rubric-2026.09.13 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 67 → 67 (+0.0)
- Architecture 53 → 57 (+3.4)
- Maturity 44 → 44 (+0.0)
- Readiness 18 → 18 (+0.0)
- Security 96 → 97 (+1.1)
Resolved (5)
- Documentation: no project overview (README.md)
- Duplicated block (10–11 lines × 2) (WebSharper.UI.Templating.Runtime/Runtime.fs)
- Near-duplicate member pair (372 shared lines) (WebSharper.UI.Templating/OldProvider.fs)
- Off-boarding risk: anonymized user #1
- redundant comment (WebSharper.UI.CSharp.Templating.ServerSide.Tests/Routing.cs)
New (3)
- Duplicated block (10–11 lines × 2) (WebSharper.UI.Templating.Runtime/Runtime.fs)
- Near-duplicate member pair (372 shared lines) (WebSharper.UI.Templating/OldMain.fs)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- (root) — 1 commit
Notable commits
- change: Version 10.1.5.677
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
dotnet-websharper/ui was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 40bebe5134b1151676264ddfb3a8e9e30b684b3a — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-4f4226d619ea.