Expand description
kozan — the Kozan UI platform.
Single entry point for application authors. Re-exports everything needed to build a Kozan application — no internal crate knowledge required.
§Quick start
ⓘ
use kozan::prelude::*;
fn main() -> kozan::Result<()> {
App::new()
.window(WindowConfig::default(), |ctx| {
let doc = ctx.document();
let div = doc.div();
div.style().w(px(200.0)).bg(hex("#ff4444"));
doc.body().child(div);
})
.run()
}§Feature flags
| Flag | What it enables | Default |
|---|---|---|
winit | winit windowing backend | yes |
vello | vello/wgpu GPU renderer | yes |
Re-exports§
pub use prelude::*;
Modules§
- prelude
- The Kozan prelude —
use kozan::prelude::*; - time
- Platform time utilities (sleep, interval, timeout).
Structs§
- Absolute
Color - An absolutely specified color, using either rgb(), rgba(), lab(), lch(), oklab(), oklch() or color().
- App
- The Kozan application — lifecycle controller.
Enums§
- Border
Style - A specified value for a single side of a
border-styleproperty. - CssValue
- A CSS dimension value that can be used in any property context.
- Error
- Unified error type for application-level failures.
Type Aliases§
- Result
- Convenience alias for
std::result::Result<T, kozan::Error>.