Prowl.Paper evaluates styles in the order you write them, and later calls always win. That one rule is the entire basis for state-driven styling: you write a base appearance first, then append overrides that only fire under specific conditions. The result is a single, readable chain that covers every visual state of an element.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.
State accessors
Four built-in accessors open a conditional style block on anElementBuilder:
| Accessor | Condition |
|---|---|
.Hovered | Pointer is inside the element’s bounds |
.Active | Element is currently being pressed |
.Focused | Element holds keyboard focus |
.Normal | Always active — unconditional convenience wrapper |
StateDrivenStyle instead of ElementBuilder. You call styling methods on StateDrivenStyle exactly as you would on ElementBuilder, and then you must call .End() to close the block and return to the ElementBuilder chain.
Custom conditions with .If(bool)
.If(condition) lets you open a conditional block on any boolean expression — computed state, application flags, feature toggles, anything:
Style ordering and precedence
Because styles are applied in call order, whichever call comes last wins. This is the mechanism for conditional overrides:isDisabled is true the disabled color takes precedence over the hover color, because .If(isDisabled) comes after .Hovered in the chain.
.Hovered, .Active, and .Focused each open a StateDrivenStyle block conditioned on paper.IsElementHovered(...), paper.IsElementActive(...), or paper.IsElementFocused(...) respectively — there is nothing special about them beyond convenience.Named styles and .Style()
Instead of writing inline properties, you can apply a registered StyleTemplate by name. Paper looks up the base template and automatically applies any matching pseudo-state variants (name:hovered, name:focused, name:active) based on the element’s current state:
StyleTemplate instance directly:
StateDrivenStyle block, .Style() works the same way but is only applied when the block’s condition is active:
Conditional named styles with .StyleIf()
.StyleIf(bool, params string[]) is a shorthand for wrapping .Style() in an .If() block:
Parent style inheritance with .InheritStyle()
An element can inherit style properties from its parent (or any other element) using InheritStyle. When called without arguments the element inherits from its immediate layout parent:
ElementHandle to inherit from a specific element rather than the direct parent:
InheritStyle sets up a style parent link; it does not copy values. The child reads its parent’s computed value every frame, so the link stays live if the parent’s style changes.