FS.GG.UI.Layout 0.1.64-preview.1

Prefix Reserved
This is a prerelease version of FS.GG.UI.Layout.
There is a newer version of this package available.
See the version list below for details.
dotnet add package FS.GG.UI.Layout --version 0.1.64-preview.1
                    
NuGet\Install-Package FS.GG.UI.Layout -Version 0.1.64-preview.1
                    
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="FS.GG.UI.Layout" Version="0.1.64-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FS.GG.UI.Layout" Version="0.1.64-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="FS.GG.UI.Layout" />
                    
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 FS.GG.UI.Layout --version 0.1.64-preview.1
                    
#r "nuget: FS.GG.UI.Layout, 0.1.64-preview.1"
                    
#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 FS.GG.UI.Layout@0.1.64-preview.1
                    
#: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=FS.GG.UI.Layout&version=0.1.64-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=FS.GG.UI.Layout&version=0.1.64-preview.1&prerelease
                    
Install as a Cake Tool

FS.GG.UI.Layout

Pure layout and graph scene builders for FS.GG.UI.

FS.GG.UI.Layout is one of the FS.GG.UI distribution packages — an F# / Elmish UI and 2D scene-graph framework for .NET 10 desktop, rendered through Vulkan + SkiaSharp.

Install

dotnet add package FS.GG.UI.Layout

Or scaffold a full governed project that wires the FS.GG.UI packages together:

dotnet new install FS.GG.UI.Template
dotnet new fs-gg-ui -o MyApp

Usage

open FS.GG.UI.Layout

// Stack two children into an 800x600 region.
let panel =
    Layout.verticalStack
        (Defaults.stackConfig 800.0 600.0)
        [ Defaults.child headerScene
          Defaults.child bodyScene ]

// Evaluate a node tree, then hit test the computed bounds.
let root = Defaults.layoutNode "root"
let result = Layout.evaluate (Defaults.availableSpace 800.0 600.0) root
let snap = Defaults.pixelSnapPolicy 1.0

match Layout.hitTestComputed snap result 120.0 64.0 with
| Some nodeId -> printfn "hit %s" nodeId
| None -> ()

// Build and probe a directed graph scene.
let graph =
    { Config = Defaults.graphConfig Directed 400.0 300.0
      Nodes = [ { Id = "a"; Label = "A"; Style = None }
                { Id = "b"; Label = "B"; Style = None } ]
      Edges = [ { Source = "a"; Target = "b"; Weight = None; Label = None } ] }

match Graph.layout graph with
| Ok placed -> Graph.hitTest placed 50.0 50.0 |> ignore
| Error issues -> issues |> List.iter (printfn "%A")

API at a glance

  • Layout.evaluate / Layout.evaluateIncremental — compute (or incrementally recompute) a LayoutResult for a LayoutNode tree against an AvailableSpace.
  • Layout.horizontalStack / Layout.verticalStack / Layout.dock — build a Scene from LayoutChild lists using StackConfig / DockConfig; measureHorizontal / measureVertical return the child LayoutBounds.
  • Layout.renderComputed, Layout.snapBounds, Layout.hitTestComputed — turn a computed result into a Scene, apply a PixelSnapPolicy, and resolve a point to a LayoutNodeId.
  • Layout.constraints, Layout.measureProtocol, Layout.intrinsicQuery, Layout.evaluateIntrinsic, Layout.cacheEntry, and Layout.contentExtent — Feature150's explicit constraints-down, sizes-up and intrinsic-query contract. These records expose deterministic identities and dependency keys so containers can request natural size without inspecting rendered descendants.
  • Layout.initWorkflow / Layout.updateWorkflow / Layout.interpretWorkflowEffect — Elmish-style LayoutWorkflowModel / LayoutWorkflowMsg / LayoutWorkflowEffect loop for host-resize and invalidation handling.
  • Graph.layout / Graph.directed / Graph.undirected — lay out or render a GraphDefinition, returning a Result with GraphValidationIssue lists on failure; Graph.hitTest resolves a point to a GraphTarget.
  • GraphValidation.validate / hasCycle / disconnectedComponents — inspect a GraphDefinition for duplicate ids, missing endpoints, self-loops, cycles, and connectivity.
  • Defaults — constructors for the core records (layoutNode, availableSpace, pixelSnapPolicy, stackConfig, dockConfig, graphConfig, child, plus default padding / layoutIntent / sizing).

Intrinsic Layout Protocol

Feature150 keeps Yoga as the default evaluator and adds explicit protocol records around it: parents create LayoutConstraints, participants produce MeasuredLayoutResult values with child placements, and containers that need natural sizes issue IntrinsicQuery values. Layout.contentExtent is the reference helper for fixed viewports such as ScrollViewer; it returns content width/height, max offsets, extent source, diagnostics, and dependency keys.

P8 Layout Readiness

Feature151 accepts the P8 layout bar without adding a new public surface. The readiness package under specs/151-complete-p8-layout/readiness/ records the representative corpus, invalid and fallback diagnostics, measured and intrinsic dependency identities, stale-rejection evidence, and full/incremental parity. Consumers should treat the Feature150 protocol helpers as the stable public entry points for P8 evidence.

Versioning

All FS.GG.UI.* libraries share one version and move together. In a generated project a single <FsGgUiVersion> in Directory.Packages.props pins every package — upgrading is one edit; see docs/UPGRADING.md. Pre-release versions use a -preview.N suffix.

Product Compatible and additional computed target framework versions.
.NET 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.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on FS.GG.UI.Layout:

Package Downloads
FS.GG.UI.Controls

Declarative Skia controls, rich rendering, chart controls, graph controls, DataGrid, and product-owned control runtime contracts.

FS.GG.UI

Optional BOM / metapackage for the FS.GG.UI framework. Reference this single package at one version to pin the entire coherent FS.GG.UI.* set to that version; any attempt to mix a member at a different version fails loudly at restore/build. Ships no assembly — dependencies only.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.19.0 0 7/23/2026
0.18.6 0 7/23/2026
0.18.5 0 7/22/2026
0.18.4 0 7/22/2026
0.18.0 0 7/22/2026
0.15.0 233 7/20/2026
0.14.0 139 7/19/2026
0.13.0 170 7/18/2026
0.12.0 305 7/17/2026
0.11.0 378 7/16/2026
0.10.0 721 7/14/2026
0.9.2 577 7/13/2026
0.9.0 725 7/11/2026
0.8.0 245 7/11/2026
0.7.0 198 7/11/2026
0.6.0 169 7/10/2026
0.5.0 220 7/10/2026
0.4.0 318 7/9/2026
0.4.0-preview.1 77 7/9/2026
0.1.64-preview.1 91 7/5/2026
Loading failed