Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl.Paper/llms.txt

Use this file to discover all available pages before exploring further.

Prowl.Paper is an open-source, MIT-licensed immediate-mode UI library for .NET. It powers the Prowl Game Engine’s editor UI and is available as a standalone NuGet package for any .NET 6–10 or netstandard2.1 project. Rather than managing persistent widget trees, Paper lets you declare your entire UI on every frame — making your code simpler, more direct, and trivially reactive to any state change.

Quickstart

Build your first Paper UI in minutes with a working code example.

Installation

Add Prowl.Paper via NuGet and configure a renderer backend.

Core Concepts

Understand immediate-mode UI, elements, layout, and the frame loop.

API Reference

Full reference for every class, method, and property in the library.

What makes Paper different

Paper follows the immediate-mode GUI (IMGUI) paradigm — there are no retained widget objects, no data-binding, and no virtual DOM. You write ordinary C# code that runs every frame:
Paper.Box("MyButton")
    .Size(120, 40)
    .BackgroundColor(Color.ForestGreen)
    .Rounded(8)
    .Text("Click Me", myFont)
    .Hovered
        .BackgroundColor(Color.DarkGreen)
    .End()
    .Transition(GuiProp.BackgroundColor, 0.15f, Easing.SineInOut)
    .OnClick(_ => Console.WriteLine("clicked!"));
State changes automatically flow into the next rendered frame — no setState, no subscriptions required.

Key features

Flexible Layout Engine

Row, Column, and absolute positioning with Pixels, Percentage, Stretch, and Auto sizing units.

Rich Animation System

AnimateBool, AnimateFloat, AnimateSpring, AnimateColor, Shake, Pulse, and more — all stateless from your code’s perspective.

State-Driven Styles

Inline .Hovered, .Active, .Focused, and .If() blocks for conditional styling without any extra state variables.

Hardware Vector Graphics

Anti-aliased paths, gradients, box shadows, backdrop blur, and custom shaders via Prowl.Quill.

Rich Text & Markdown

Render plain text, CommonMark Markdown, or tagged rich text with animation effects like typewriter and rainbow.

Pluggable Renderers

Implement ICanvasRenderer to target OpenTK, Raylib, WebGL/WASM, or any custom backend.

Quick example

The snippet below shows a complete minimal app structure. Paper’s frame loop is three calls:
1

Initialize once

var paper = new Paper(myRenderer, screenWidth, screenHeight, fontAtlasSettings);
2

Feed input every frame

paper.SetPointerPosition(mouseX, mouseY);
paper.SetPointerState(PaperMouseBtn.Left, mouseX, mouseY, isLeftDown, false);
paper.SetPointerWheel(wheelDelta);
3

Declare UI between BeginFrame / EndFrame

paper.BeginFrame(deltaTime);

using (paper.Column("Root").Enter())
{
    paper.Box("Title")
        .Height(60)
        .BackgroundColor(50, 120, 200)
        .Text("My App", titleFont);

    paper.Box("Content");
}

paper.EndFrame();
Ready-to-run samples for OpenTK, Raylib, and WebAssembly/WebGL are included in the GitHub repository.

Build docs developers (and LLMs) love