SumerUI.Generators
0.3.0
dotnet add package SumerUI.Generators --version 0.3.0
NuGet\Install-Package SumerUI.Generators -Version 0.3.0
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="SumerUI.Generators" Version="0.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SumerUI.Generators" Version="0.3.0" />
<PackageReference Include="SumerUI.Generators" />
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 SumerUI.Generators --version 0.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SumerUI.Generators, 0.3.0"
#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 SumerUI.Generators@0.3.0
#: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=SumerUI.Generators&version=0.3.0
#tool nuget:?package=SumerUI.Generators&version=0.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SumerUI
A type-safe, fluent C# library for generating static HTML with Tailwind-inspired utilities.
Features
- 🎨 Fluent API - Chainable methods for building HTML
- 🔒 Type-safe - No magic strings, full IntelliSense support
- 🎯 Tailwind-inspired - Familiar utility-first approach
- 📦 Static site generation - Export to HTML files for CDN deployment
- 🚀 Zero JavaScript - Pure server-side rendering
- Typst source rendering - Reuse element trees for static print-oriented documents
Quick Start
using SumerUI.Elements;
using SumerUI.Generators;
using static SumerUI.Elements.HtmlElements;
// Create a page
var page = Div()
.Flex()
.ItemsCenter()
.JustifyCenter()
.Padding(2.Rem())
.BackgroundColor(Color.Emerald50)
.Content(
H1().Text("Hello, SumerUI!").FontBold().Text2Xl()
);
// Generate static site
var generator = new StaticSiteGenerator("./out");
await generator.GeneratePageAsync("/", page);
Typst Source
using SumerUI.Renderers;
var renderer = new TypstRenderer();
var source = renderer.RenderToString(page);
foreach (var diagnostic in renderer.Diagnostics)
{
Console.WriteLine($"{diagnostic.Code}: {diagnostic.Message}");
}
TypstRenderer emits Typst source; it does not compile PDFs. It maps static document styling and reports diagnostics when browser-only behavior such as responsive rules, hover states, scripts, or animations is omitted.
Installation
dotnet add package SumerUI
dotnet add package SumerUI.Renderers
dotnet add package SumerUI.Generators
Examples
See examples/ for complete examples:
basic/- ASP.NET server-side renderingbasic-generator/- Static site generationstorefront/- Product pages, session cart, and protected forms
Documentation
- Getting Started - Installation and first steps
- API Reference - Complete API documentation
- HTML rendering behavior - Styles, whitespace, and concurrent rendering
- Components Guide - Building reusable components
- Architecture Guide - Project structure and patterns
- Real-World Examples - Production-ready examples
- Code Examples - Working example projects
Contributing
Contributions welcome! See CONTRIBUTING.md
License
MIT
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- SumerUI (>= 0.3.0)
- SumerUI.Renderers (>= 0.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.