Kael applications are built around a simple pattern: you define a struct to hold your application state, implement theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Augani/kael/llms.txt
Use this file to discover all available pages before exploring further.
Render trait on it, and open a window. The framework handles the rest — reactive updates, GPU rendering, and event dispatch — so you can focus on your UI logic. This guide walks you through that pattern from scratch.
Add Kael to Cargo.toml
Create a new Rust binary project and add Kael as a dependency. Kael is available on crates.io and via its Git repository.
Implement Render on your application struct
Every Kael window is backed by a struct that implements the A few things to note:
Render trait. Your struct holds the application state; render returns the element tree Kael displays each frame.The example below is a counter: clicking the “Increment” label increments the count and Kael automatically re-renders the window.main.rs
div()is the primary layout element. Chain style methods like.flex(),.flex_col(), and.gap_2()to control layout and spacing..child()accepts strings, formatted strings, and other elements. Children are rendered in order.cx.listener(...)creates a closure that receives a mutable reference to your struct, letting you update state directly. Kael schedules a re-render automatically after the handler runs.cx.new(|_| ...)registers your struct as a managed entity. The returned handle is whatopen_windowuses to drive the render cycle.
Explore the examples
The Kael repository includes a set of runnable examples that cover animations, webviews, form controls, and more. Clone the repository and run any example with:hello_world example renders a styled greeting with colored boxes, demonstrating border, shadow, and text color utilities. The animation example shows how to apply keyframe animations to SVG elements using Animation::new and easing functions like bounce(ease_in_out).
Examples are defined in
crates/kael/examples/ in the repository. You need to clone the repository to run them — they are not included when depending on the published crate.Next steps
Installation
Configure Cargo features and install Linux system dependencies
Entities and context
Understand how Kael’s entity model drives reactive state
Elements and rendering
Learn the full element API and the render lifecycle
Layout and styling
Master flexbox layout, spacing, color, and typography utilities