Every element in Prowl.Paper is styled through a fluent chain of method calls onDocumentation 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.
ElementBuilder. All styling methods return this, so you can compose any number of properties in a single expression. Styles are re-applied every frame — Paper evaluates them top to bottom, and later calls override earlier ones, which is the mechanism that makes state-driven overrides (hover, active, etc.) work naturally.
Background
Solid color
Gradients
Paper supports three gradient types. All coordinate parameters are relative to the element’s own rectangle (0.0 = start edge, 1.0 = end edge), so gradients scale automatically with the element.Background image
Pass any texture object that your renderer backend recognises. The texture is stretched to fill the element’s layout rectangle..ClearBackgroundImage().
Border
Corner rounding
Box shadow
BoxShadow value ahead of time and pass it directly:
Backdrop blur (frosted glass)
BackdropBlur blurs whatever is rendered behind the element. Combine it with a translucent BackgroundColor for a classic frosted-glass panel.
Text styling
TextColor sets the foreground color for any text rendered inside the element. The remaining text properties control typography:
| Method | Description |
|---|---|
TextColor(Color) | Foreground color for text inside the element |
FontSize(float) | Font size in pixels (default 16) |
LetterSpacing(float) | Extra space between characters in pixels (default 0) |
WordSpacing(float) | Extra space between words in pixels (default 0) |
LineHeight(float) | Line-height multiplier relative to font size (default 1.0) |
TabSize(int) | Number of spaces a tab character expands to (default 4) |
Transforms
All transform properties operate around a configurable origin point (default: element center, i.e.0.5, 0.5).
| Method | Description |
|---|---|
TranslateX(float) / TranslateY(float) | Pixel offset along X or Y |
Translate(float x, float y) | Offset on both axes at once |
ScaleX(float) / ScaleY(float) | Per-axis scale factor |
Scale(float) | Uniform scale on both axes |
Scale(float x, float y) | Independent per-axis scale |
Rotate(float degrees) | Rotation in degrees |
SkewX(float) / SkewY(float) | Shear angles |
Skew(float x, float y) | Both axes at once |
TransformOrigin(float x, float y) | Pivot point (0–1 normalised) |
Transform(Transform2D) | Apply a raw 2D transform matrix directly |
StyleTemplate — reusable styles
AStyleTemplate stores a snapshot of style calls that you can apply to many elements. This is the foundation for Paper’s theming system.
Creating derived templates
ApplyTo lets you push one template’s properties into another template:
Registering named styles
Register a template by name on thePaper instance so it can be referenced by string later:
DefineStyle combines creation and registration in one call:
StyleFamilyBuilder — base + state variants
CreateStyleFamily registers a base template plus optional per-state overrides (hover, focused, active) under a shared name prefix. Paper’s ApplyStyleWithStates then picks the right variant automatically based on the element’s current interaction state.
RegisterStyleFamily if you prefer to build the templates separately:
"name:hovered", "name:focused", and "name:active", which you can also register individually with RegisterStyle.