Skip to main content

Crate kozan

Crate kozan 

Source
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

FlagWhat it enablesDefault
winitwinit windowing backendyes
vellovello/wgpu GPU rendereryes

Re-exports§

pub use prelude::*;

Modules§

prelude
The Kozan prelude — use kozan::prelude::*;
time
Platform time utilities (sleep, interval, timeout).

Structs§

AbsoluteColor
An absolutely specified color, using either rgb(), rgba(), lab(), lch(), oklab(), oklch() or color().
App
The Kozan application — lifecycle controller.

Enums§

BorderStyle
A specified value for a single side of a border-style property.
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>.