SumerUI 0.3.0
dotnet add package SumerUI --version 0.3.0
NuGet\Install-Package SumerUI -Version 0.3.0
<PackageReference Include="SumerUI" Version="0.3.0" />
<PackageVersion Include="SumerUI" Version="0.3.0" />
<PackageReference Include="SumerUI" />
paket add SumerUI --version 0.3.0
#r "nuget: SumerUI, 0.3.0"
#:package SumerUI@0.3.0
#addin nuget:?package=SumerUI&version=0.3.0
#tool nuget:?package=SumerUI&version=0.3.0
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. |
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on SumerUI:
| Package | Downloads |
|---|---|
|
SumerUI.Generators
Static site generator for SumerUI. Generate complete static websites from SumerUI elements with support for routing, asset management, and deployment options. |
|
|
SumerUI.Renderers
HTML and Typst source renderers for SumerUI elements. |
GitHub repositories
This package is not used by any popular GitHub repositories.