WebUI Directives
WebUI Framework offers several directives that allow you to create dynamic templates without JavaScript. These directives are processed during rendering to produce the final HTML output.
Available Directives
WebUI Framework provides the following core directives:
<if>Conditional Rendering - Conditionally render content based on expressions<for>Loop Iteration - Iterate over collections to generate repeated content<route>Routing - Define client-side routes that map URL paths to components{{}}Signal Binding - Insert dynamic values with automatic HTML escaping{{{}}}Raw Signal Binding - Insert unescaped HTML content- Attribute Directives - Bind dynamic data to HTML attributes (
{{}},?,:, and mixed)
How Directives Work
WebUI directives are processed by the WebUI parser and transformed into a platform-agnostic protocol. This protocol is then rendered by a language-specific handler, allowing the same template to be rendered consistently across multiple platforms.
Template with directives → WebUI Protocol → Native HTML outputThe WebUI protocol is a protobuf binary structure defined by a cross-language .proto schema, making it ideal for cross-platform applications.