Get started – VB
Fuaran.UI.VisualBasic lets you author a Fuaran UI tree as first-class XML literals: the markup is the tree. Pair it with Fuaran.UI.Analyzers and the wow
lands at compile time: an unknown element or attribute is a red squiggle in your editor, checked against the language's real vocabulary before you ever run the
code. FuaranXml.Encode then walks the XElement and drives the same canonical F#
encoder every host uses – no VB codec, no FSharp.Core type on the surface you touch.
Install
dotnet add package Fuaran.UI
dotnet add package Fuaran.UI.VisualBasic
dotnet add package Fuaran.UI.Analyzers # the compile-time vocabulary check – the whole point
Author a tree
Each element name is a node kind, each attribute maps to a spec field, and nested elements become the parent's children. Misspell <Heding> or text= and
the analyzer reds it before build.
Imports Fuaran.UI.VisualBasic
Dim tree = <Dashboard id="root">
<Heading id="title" text="Channel performance"/>
<Markdown id="note" text="**Hello** from a Fuaran tree."/>
</Dashboard>
Encode to canonical wire JSON
Dim wire As String = FuaranXml.Encode(tree)
' canonical JSON – byte-identical to the F#, C#, TypeScript, and Python hosts
The tree you just built
Rendered by this very site from the exact JSON Encode produces – with a one-click
link into the playground:
Channel performance
Hello from a Fuaran tree.
{"accessibility":{"role":"main"},"id":"root","kind":{"$type":"Box","children":[{"id":"title","kind":{"$type":"Heading","level":2,"text":"Channel performance","variant":"Standard"}},{"id":"note","kind":{"$type":"Markdown","text":"**Hello** from a Fuaran tree."}}],"layout":{"$type":"Auto"},"role":"Dashboard"}}
Prefer fluent? VB speaks that too
The XML literals are a veneer over the C# factory surface (Fuaran.UI.CSharp) –
and that surface is plain .NET, so you can drive it directly from VB in the
same fluent options-record style the C# track documents.
With { } initializers set the options records, bare strings and numbers widen
through the same implicit conversions, and C#'s required-member enforcement
carries over: omit a required field and VB fails the build with BC37321 – the
same compile-time guarantee C# callers get.
Imports Csharp = Fuaran.UI.CSharp
Dim tree = Csharp.Fuaran.Dashboard(New Csharp.DashboardOptions With {
.Id = "root",
.Children = {
Csharp.Fuaran.Heading(New Csharp.HeadingOptions With {
.Id = "title", .Text = "Channel performance"}),
Csharp.Fuaran.Markdown(New Csharp.MarkdownOptions With {
.Id = "note", .Text = "**Hello** from a Fuaran tree."})}})
Dim wire As String = tree.Encode()
Both spellings – XML literal and fluent – produce byte-identical wire JSON:
all roads drive the same factories and the same canonical F# encoder. That parity
is a regression check in the VB conformance suite, not a doc claim. The XML
literals stay the recommended idiom (closest to the VBA mental model, lighter per
node); the fluent style is there when you want factory calls, or when you are
porting C# samples line-for-line. Details and the type-import spelling (Imports Fuaran.UI.CSharp.Fuaran for unqualified Card(…) calls) are in
authoring from VB.
Next
- Render it server-side with
Fuaran.UI.Renderer.Server– hand the encoded wire to the SSR renderer, exactly as this site does. An embedded in-process browser renderer for .NET hosts is landing as a follow-up. - See the component reference for every node kind and the guide – including authoring from VB.