GuiBlast 2.1.1
dotnet add package GuiBlast --version 2.1.1
NuGet\Install-Package GuiBlast -Version 2.1.1
<PackageReference Include="GuiBlast" Version="2.1.1" />
<PackageVersion Include="GuiBlast" Version="2.1.1" />Directory.Packages.props
<PackageReference Include="GuiBlast" />Project file
paket add GuiBlast --version 2.1.1
#r "nuget: GuiBlast, 2.1.1"
#:package GuiBlast@2.1.1
#addin nuget:?package=GuiBlast&version=2.1.1Install as a Cake Addin
#tool nuget:?package=GuiBlast&version=2.1.1Install as a Cake Tool
GuiBlast
RoadWarrior
GuiBlast provides simple, cross-platform modal prompts and dynamic forms using Avalonia. It works out-of-the-box in .NET console apps, LINQPad, and PowerShell scripts β no window management required.
β¨ Features
- πΉ Minimal blocking & async APIs (
Input,Confirm,Message) - πΉ JSON-driven dynamic forms with validation & visibility rules
- πΉ Light/Dark theme switching via
Theme.Set - πΉ Runs Avalonia on a hidden UI thread β safe for console and scripting environments
π¦ Installation
dotnet add package GuiBlast
Or install from NuGet Gallery.
π Quick Example
using GuiBlast.Forms.Rendering;
using GuiBlast.Forms.Result;
namespace GuiBlast.TryOut;
class Program
{
static void Main()
{
// Step 1: Prompt for name
var userName = Prompts.Input("Your Name", "Please enter your name:");
// Step 2: Load form JSON spec
var json = File.ReadAllText("form.json");
// Step 3: Pre-fill the form with the name
var overrides = new Dictionary<string, object?>
{
["name"] = userName
};
// Step 4: Show form
var result = DynamicForm.ShowJsonAsync(json, overrides).Result;
// Step 5: Print outcome
Console.WriteLine($"Submitted: {result.Submitted}");
Console.WriteLine("---- TEXT ----");
Console.WriteLine(result.ToText());
Console.WriteLine("---- JSON ----");
Console.WriteLine(result.ToJson(indented: true));
Console.WriteLine("---- DIRECT TO WRITER ----");
result.WriteText();
}
}
π JSON Form Specification
GuiBlast forms are defined declaratively in JSON:
{
"title": "Peer",
"size": { "width": 420, "height": 320 },
"resizable": true,
"data": {
"name": "Alice",
"role": "User",
"enabled": true,
"quota": 5,
"tags": ["a", "c"]
},
"fields": [
{ "key": "name", "type": "text", "label": "Name", "required": true },
{
"key": "role",
"type": "select",
"label": "Role",
"options": [
{ "value": "User", "label": "User" },
{ "value": "Admin", "label": "Admin" },
{ "value": "Guest", "label": "Guest" }
]
},
{ "key": "enabled", "type": "switch", "label": "Enabled" },
{ "key": "quota", "type": "number", "label": "Quota (GB)", "min": 0, "max": 100 },
{
"key": "tags",
"type": "multiselect",
"label": "Tags",
"options": [
{ "value": "a", "label": "a" },
{ "value": "b", "label": "b" },
{ "value": "c", "label": "c" }
]
},
{ "key": "when", "type": "datetime", "label": "When" }
],
"visibility": [
{ "field": "role", "eq": "Admin", "show": ["quota"] },
{ "field": "role", "neq": "Admin", "hide": ["quota"] }
],
"actions": [
{ "id": "save", "label": "Save", "submit": true },
{ "id": "cancel", "label": "Cancel", "dismiss": true }
]
}
π§ Supported Field Types
text,number,switchselect,multiselectdatetime
Validation & conditional visibility can be expressed directly in JSON.
π€ AI assistants
This assembly carries the Blast.PrimaryFacade convention: an
[AssemblyMetadata("Blast.PrimaryFacade", "...")] attribute names the
canonical front-door type(s) of the package, so AI helpers (e.g.
TaskBlaster's script assistant) can identify the entry points without
scanning every public type.
For GuiBlast the front doors are:
| Type | Purpose |
|---|---|
GuiBlast.Prompts |
Quick modal prompts: Input, Confirm. |
GuiBlast.Forms.Rendering.DynamicForm |
JSON-driven forms: ShowJsonAsync and friends. |
Read it back from a loaded assembly via reflection:
var facade = typeof(GuiBlast.Prompts).Assembly
.GetCustomAttributes<AssemblyMetadataAttribute>()
.FirstOrDefault(a => a.Key == "Blast.PrimaryFacade")?.Value;
The value is a hint for tooling; consumers don't need to read it.
π License
| Product | Versions 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. |
-
net10.0
- Avalonia (>= 12.0.1)
- Avalonia.Desktop (>= 12.0.1)
- Avalonia.Fonts.Inter (>= 12.0.1)
- Avalonia.Headless (>= 12.0.1)
- Avalonia.Headless.XUnit (>= 12.0.1)
- Avalonia.Themes.Fluent (>= 12.0.1)
- xunit.v3.extensibility.core (>= 3.2.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.